Support » Plugin: Inline Google Spreadsheet Viewer » Open Links In New Window

  • website-update-services

    (@website-update-services)


    Hi,

    Not asking the plugin developer but users in general.

    Is there any way to get links rendered from a spreadsheet to open in a new window, similar to _blank?

    Thanks, J

Viewing 1 replies (of 1 total)
  • I use a small jQuery script. It adds a .external class to all external links on the page, then adds a _blank attribute to all of those links, so this might not be suitable for your case.

    jQuery(window).load(function () { // wait for page to load
    	  
    	jQuery('a').filter(function() { // add .external class to external links
    		return this.hostname && this.hostname !== location.hostname;
    	}).addClass("external");
    
    	jQuery(".external").attr("target","_blank"); // add _blank to .external elements
    
      });
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.