I am doing a check on all hreh tags that do not in end in .com. So if they do not end in .com I need to show a message.
I can add .com without any issues, but when I do http://localhost (for testing in development) it is not working. Basically if they are in development I DO NOT want the confirm message to fire:
$('a.externalLinkFunctionalityEnabled').click(function (e) {
// Check if the link's href property doesn't contain ".com"
if (($(this).attr('href').indexOf('.com') < 0) ) {
//
if (!confirm()) {
// If the user cancels, prevent navigation
e.preventDefault();
}
}
});
Go to the complete details ...