I bind to a link (by using the .live()
function of jQuery) click
event and then manually add an onclick
event handler with pure JS and HTML (like <a href="".... onclick="some action">
). I want to prevent bubbling of the event to the live
method but I don't know how.
Maybe e.stopPropagation()
is helpful in this situation but the event handler added with onclick
is written in pure JS and I can't call stopPropagation()
from outside the jQuery element wrapper. return false
in this situation does not work. I tried to substitute return false
with $.Event('click').stopPropagation()
but I think this is wrong as it did not work.
How to prevent bubling to live()
method without jQuery wrapper?