Posted By

cleo on 01/04/11


Tagged

jquery links


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

AllKnightAccess
virendrakryadav
czehner
dubogii


Jquery External Links


 / Published in: jQuery
 

  1. function externalLinks(){
  2. var baseAddress = window.location.hostname;
  3. $("a[href^='http:']").not("[href*='"+baseAddress+"']").click(function(){
  4. window.open(this.href); return false;
  5. })
  6. }

Report this snippet  

You need to login to post a comment.