Posted By

satonthat on 03/18/10


Tagged

javascript jquery


Versions (?)

Open all external links in a new window using Jquery


 / Published in: jQuery
 

  1. $("a[href*='http://']:not([href*='"+location.hostname+"'])").click( function() {
  2. window.open( $(this).attr('href') );
  3. return false;
  4. });

Report this snippet  

You need to login to post a comment.