Posted By

joe-bbb on 10/28/09


Tagged

window jquery open


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

doodledan


jquery open link new window


 / Published in: JavaScript
 

  1. function external_links (selector) {
  2. var selector = $(selector);
  3. selector.attr('title', 'opens in a new window');
  4. selector.each(function(){
  5. $(this).click(function(){
  6. var url = $(this).attr('href');
  7. window.open(url,'_blank','height=640,width=1040', false);
  8. return false;
  9. });
  10. });
  11. }
  12.  
  13. external_links('#nav ul li a');

Report this snippet  

You need to login to post a comment.