Return to Snippet

Revision: 49975
at January 12, 2012 09:32 by Huskie


Updated Code
$('a[rel*=external]').click(function() {
   window.open(this.href);
   return false;
});

Revision: 49974
at September 9, 2011 20:29 by Huskie


Updated Code
jQuery(function()
{
        jQuery('a[rel*=external]').click(function()
        {
		window.open(this.href);
                return false;
        });
});

Revision: 49973
at August 3, 2011 19:14 by Huskie


Initial Code
$(function()
{
        $('a[rel*=external]').click(function()
        {
		window.open(this.href);
                return false;
        });
});

Initial URL
http://darrenhuskie.com/

Initial Description
Add attribute to links to open them in a new window. Example - rel="external". Alternative to target="_blank", conforming to XHTML specification.

Initial Title
jQuery rel=\"external\" to open links in new window

Initial Tags
window, jquery, links

Initial Language
jQuery