Suppose I have this HTML:
<div> <a href="http://google.com">Google</a> </div>
And I have such an event handler (suppose I have jQuery):
$('div').on('click', function(ev) {
Is it possible, from within this event handler, to prevent the default action of the <a>
link? Or is it too late? (In other words, I need to attach the event to <a>
or lower to prevent the default link from working, or I can stop it in the above handler).
As said above, I have jQuery if this requires its solution.
source share