Return to Snippet

Revision: 52791
at November 1, 2011 15:09 by jackkeller


Initial Code
$('a').each(function() {
   var a = new RegExp('/' + window.location.host + '/');
   if(!a.test(this.href)) {
       $(this).click(function(event) {
           event.preventDefault();
           event.stopPropagation();
           window.open(this.href, '_blank');
       });
   }
});

Initial URL


Initial Description


Initial Title
Open External Links In New Window

Initial Tags
jquery

Initial Language
JavaScript