/ Published in: JavaScript

Expand |
Embed | Plain Text
// Open external links in new windows using jquery $('a[href^="http://"]').filter(function() { return this.hostname && this.hostname !== location.hostname; }).attr('target', '_blank');
You need to login to post a comment.