javascript - Catching click event while delete thumbnail -


i modified fu thumbnail template hook click event on it. display delete button (the provided one). problem when click on delete button, click event bubbles rest of javascript stack.

how can prevent delete button propagate click event?? (usually event.stoppropagation()...).

thanks help

if you'd prevent dom event bubbling, attach event handler element terminate , call stoppropagation() on event object. example, click event:

someelement.addeventlistener('click', function(event) {    event.stoppropagation(); }); 

the above code not work in ie8 , older since addeventlistener , stoppropagation first introduced in ie9.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -