/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Convert the links with rel="external" * * v. 0.1 Updated (07/02/11) * - Changed de CSS selector adding the posibility to external wasn't the only string in rel * attribute. * - Changed de string from "extern" to "external", that's looks more adequate. * */ function initRelLinks(){ jQuery('a[rel*="external"]').click(function(){ jQuery(this).attr('target', '_blank'); }); }
Comments
