Difference between preventDefault() and return false

preview_player
Показать описание
jQuery in Action: Build 15 jQuery Projects

jQuery UI in Action: Build 9 jQuery UI Projects

Hands-On jQuery: jQuery Examples

Find all our Udemy courses here:

Difference between preventDefault() and return false

The main difference between preventDefault() and return false; is that preventDefault just prevents the default action from happening whereas return false prevents that event from propagating (or "bubbling up") through all the ancestors along with preventing the default action from happening.
Рекомендации по теме
Комментарии
Автор

Doubt cleard, thank u madam for creating simple but helpful tutorial

faheemsiddiqui
Автор

Great tutorials, 10x
But can you give us more examples in javascript and jquery
10x again

fadifarid