Jquery External Links


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.