Open a link in a new window in XHTML

XHTML1.1 does not support the target attribute and so my preferred method for opening links in a new window is:

$(document).ready(function() { 
  $('a[rel*=external]').click(function() {$(this).attr('href')); 
    return false; 

(code from

You simply include that snippet of jQuery and add the attribute rel=”external” to links that you want to have open in a new window.


Second Story creates enchanting, informative, and entertaining media experiences with innovative technologies that empower connections to ideas.

Tagged with: , ,
Posted in Technology