Posted By

leobetosouza on 08/24/11


Tagged

javascript jquery


Versions (?)

Make rel external links opens in a new window with jQuery, displaying it in the link title


 / Published in: jQuery
 

  1. $("a[rel*='external']").each(function(){
  2. $(this).attr({
  3. target:"_blank",
  4. title: ($(this).attr("title")) ? "New window: " + $(this).attr("title") : "Open in new window"
  5. });
  6. });

Report this snippet  

You need to login to post a comment.