jQuery .click function converted to javascript -
i wrote script pop confirm dialog when user clicks on link external our site. performs expected on our internet site, when try run script on our faq portal, absolutely nothing. believe blocking jquery running. recommendation converting script javascript?
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <script type="text/javascript"> $(function(){ $('a').click(function(){ if ((this.href.tolowercase().indexof("myfloridalicense.custhelp") > -1) || (this.href.tolowercase().indexof("myfloridalicense") > -1) || (this.href.tolowercase().indexof("javascript") > -1) || (this.href.tolowercase().indexof("dbprftp") > -1) || (this.href.tolowercase().indexof("interredesignalpha") > -1) || (this.href.tolowercase().indexof("bpr") > -1)) { //throw away } else { if (window.confirm('notice: accessing link, leaving dbpr website. dbpr not responsible content of internet website entering. dbpr neither warrants nor makes representations nor endorsements accuracy, quality, content or completeness of information, text, images, graphics, hyperlinks, , other items contained on internet website entering. dbpr not responsible or liable viruses or contaminations of hardware, software, peripherals or property, resulting use of internet websites linked or dbpr internet website. want proceed?')) { // clicked yes } else { // clicked no return false; } } }); }); </script>
thanks in advance help!
my first guess portal has listener attached anchor tags prevent leaving portal page. more likely, jquery not blocked, click on anchor tag blocked.
you can verify binding mouseup event on anchor tags (or 1 in particular). it's possible portal cancelling events, many people think bind click.
if have control on page, try adding click listener other anchor tag, specific div or list item. answer whether jquery active or not. once know answer question, can decide next course of action.
Comments
Post a Comment