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
Post a Comment