Return to Snippet

Revision: 50679
at August 30, 2011 04:55 by stephcode


Initial Code
//Open External Links in New Window
	$('a[href^="http://"]')	.attr({ target: "_blank" }); //Makes all links open in a new window
	$('a[href^="http://"].target')	.attr({ target: "_blank" }); //a link with the class of "target" opens in a new window

Initial URL
http://www.sohtanaka.com/web-design/jquery-easy-tips-tricks-tutorial/

Initial Description


Initial Title
jQuery compliant target="blank" effect for all links

Initial Tags
html, jquery, links

Initial Language
jQuery