Return to Snippet

Revision: 21576
at December 15, 2009 17:45 by math89


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

Initial URL


Initial Description
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.

Initial Title
Clean way to open popup windows

Initial Tags
link, windows

Initial Language
jQuery