/ Published in: jQuery
Uses jQuery to give links with rel=\"external\" the ability to open in a new window, while keeping the document XHTML or HTML Strict. Works by assigning a \"_blank\" value to the \"target\" attribute of all such links after the page has already loaded.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(function() { $('a[rel^=external]').each(function() { $(this).attr('target', '_blank'); }); });