Category: xHTML

Snippets, xHTML
Open link in a new window using jQuery

HTML: <a href="http://www.google.com" rel="external">Google</a> Javascript: $(document).ready(function() { $("a[rel=external]").attr(‘target’, ‘_blank’); }); Or $(document).ready(function() { $(‘a[rel="external"]’).click( function()