/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Begin external link speedbump - loop though each link jQuery('a').each(function(){ var href = jQuery(this).attr('href'); //check for links starting with http or https, making sure that links to My Nymeo and to our own domain are excluded if ((href.match(/^https?\:/i)) && (!href.match(document.domain)) && (!href.match(/pcu.comstarfcu.org/i))){ jQuery(this).click(function() { // On click display confirmation box var sb=confirm('You are about to leave the Nymeo web site. Please click OK to continue or Cancel to remain on this page.'); // If OK is clicked follow the link if (sb==true) { window.location(href); } else { return false; } }); } }); // End external link speedbump