What is the difference between event.PreventDefault and event.stopPropagation?
Answer / 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 |
What is the difference between onload() and document.ready()?
How to search for descendant elements that match the specified selectors using ?
Is it possible to hold or delay document.ready execution for sometime?
How can jquery library be added to pages?
How we can check if an element is empty or not using jquery?
How to divide a page into parts using jquery mobile? : jquery mobile
Mention the advantages of cdn? : jQuery Mobile
How can you select all elements in a page using jquery?
What is difference between sorting string array and sorting numerical array in jquery?
What is the difference between text() and html() in jquery?
How to get the direct parent of an element using ?
How we can modify the css class in jquery?