/ Published in: jQuery
![](/img/icon_sav.png?v3)
Add target blank or rel external to outgoing links automatically.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$("a[href^=http://]").not("a[href^=http://www.yourdomain]").attr("target", "blank"); $("a[href^=http://]").not("a[href^=http://www.yourdomain]").attr("rel", "external");
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)