What is the difference between event.PreventDefault and event.stopPropagation?
Answer Posted / chaitanya
event.preventDefault(): Stops the default action of an element from happening.
event.stopPropagation(): Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event. 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.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Does jquery follow w3c recommendations?
How to increase cursor size in html body using jquery?
Difference between parent() and parents() in jQuery?
How to disable/enable an element in jquery?
Back onto jquery ui' can you see jquery ui making more of an impression in the future, lead by the current successes of jquery?
Can you please explain the difference between parent() and parents() methods in jquery? : jquery mobile
Is jQuery a programming language?
Define animate function in jquery?
What are the two types of CDNs?
Explain the difference between event.preventdefault and "return false"? : jquery mobile
What is the use of the animate() method in jquery?
How can we apply css in div using jquery?
Explain the use of data-role=”page” attribute? : jQuery Mobile
How to revert the most recent ‘destructive’ operation, changing the set of matched elements to its previous state using ?
What are the different types of selectors?