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
How can jquery library be added to pages? Write a basic jquery code?
What are the difference between alert() and confirm()?
What is a dom in jquery? How can we make sure that dom is ready?
What is jquery.length? : jquery mobile
How to use connect?
Why we use jquery .each() function?
What is the between $(this) and 'this' in jquery?
How to give face effect in jquery?
How to keep the submit text from showing with jquery mobile? : jquery mobile
Define "beforesend(xhr)" paremeter of jquery ajax method?
How do you select an item using css class or id and get the value by use of jquery.
What does the jQuery migrate function do?
What are the basic selectors in jQuery?
What are the paremeter of jquery ajax method?
Define width() vs css('width')?