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
What methods used to provide effects?
Can there be more than one ready function in jquery?
How to find all sibling elements after the current element using ?
How to select combobox select value and text using jquery?
What is the difference between find and children methods in jquery?
What is the method used to define the specific character in place of $ sign?
Can you please explain the difference between .js and .min.js? : jquery mobile
What is jQuery code to select all links in first paragraph?
What is the advantage of using minimized version of jQuery?
With jquery ui 1.7 being released in the last few days, what do you see as the key parts of jquery ui 1.7? What are you most proud of out of that release?
How do you disable or enable a form element?
How we can get the input value of an element using jquery?
What are the effects methods used in jquery?
Explain the use jquery.data method?
Why is the block display style used for animations?