Posted By

math89 on 12/15/09


Tagged

link popup windows


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

eivind
wanderlusts
fackz


Clean way to open popup windows


 / Published in: jQuery
 

Here is a nice snippet to open links in pop-up windows. Just add the popup css class to your link to make it work.

  1. jQuery('a.popup').live('click', function(){
  2. newwindow=window.open($(this).attr('href'),'','height=200,width=150');
  3. if (window.focus) {newwindow.focus()}
  4. return false;
  5. });

Report this snippet  

You need to login to post a comment.