Posted By

Huskie on 08/03/11


Tagged

window jquery open new links


Versions (?)

jQuery rel="external" to open links in new window


 / Published in: jQuery
 

URL: http://darrenhuskie.com/

Add attribute to links to open them in a new window. Example - rel="external". Alternative to target="_blank", conforming to XHTML specification.

  1. $('a[rel*=external]').click(function() {
  2. window.open(this.href);
  3. return false;
  4. });

Report this snippet  

You need to login to post a comment.