Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
191
rated 0 times [  192] [ 1]  / answers: 1 / hits: 35081  / 10 Years ago, wed, february 12, 2014, 12:00:00

I am calling e.stopPropagation() on almost every event that I have for my current application. Is there any way to just stop the propagation for every event without having to explicitly call the method at the start of every function body?


More From » jquery

 Answers
3

No it cannot be declared Globally



The event.stopPropagation() method stops the bubbling of an event to parent elements, preventing any parent event handlers from being executed.



For example, if there is a link with a click method attached inside of a DIV or FORM that also has a click method attached, it will prevent the DIV or FORM click method from firing.



http://api.jquery.com/event.stopPropagation/


[#72569] Tuesday, February 11, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
taylert

Total Points: 627
Total Questions: 91
Total Answers: 108

Location: Mayotte
Member since Mon, Sep 12, 2022
2 Years ago
taylert questions
;