Forum Discussion
Jake_N
Mentor
Hi Suchith,
That code is definitely correct. I have tested it in Internet Explorer, Mozilla Firefox, Chrome and Edge. If it isn't working for you I would suggest checking your browser settings or even check if you have another script on the page doing something else.
You can stop any other javascript running on it typically by using preventDefault() or if you are using jQuery click here to view this page.
Hopefully, this helps. If you are stuck do you mind posting what browser you are using?
Suchith
7 years agoAce
Still no luck. I am using the below script to prevent the default flow, but the event is not executing the script.
<script> $(document).ready(function(){ $("a.lia-link-navigation").click(function(event){ event.preventDefault(); console.log("prevented"); }); }); </script>
Related Content
- 2 years ago
- 2 years ago
- 2 years ago