/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function external_links (selector) { var selector = $(selector); selector.attr('title', 'opens in a new window'); selector.each(function(){ $(this).click(function(){ var url = $(this).attr('href'); window.open(url,'_blank','height=640,width=1040', false); return false; }); }); } external_links('#nav ul li a');