|
[Edit] open external link in new window
Two different ways to open an external link (ones that start in http) in a new window //Grab the href, open it in a window and cancel the click action
$("a[href^='http']").click(function(){window.open(this.href); return false;});
//Add target = blant to the external link
$("a[href^='http']").attr('target','_blank');
//Similar to the first, only using your domain name
$("a:not([href*='yourdomainnamehere.com'])").click(function(){
window.open(this.href);
return false;
}).attr("title", "Opens in a new window");
|
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
© Advanced Web Core. All rights reserved

