Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery docs says .submit() event does not bubble in IE. What does this mean?

From the jQuery documentation for .submit():

The JavaScript submit event does not bubble in Internet Explorer. However, scripts that rely on event delegation with the submit event will work consistently across browsers as of jQuery 1.4, which has normalized the event's behavior.

What does this mean?

like image 435
christian Avatar asked Nov 04 '22 07:11

christian


1 Answers

What it means is that jQuery has mimicked the submit event bubbling process to make it appear to bubble in browsers that do not natively support it. In essence, they are writing code to make it look like bubbling. The same goes for the focus and blur events. If you want to use those for delegation, use the normalized focusin and focusout events.

like image 176
Eli Avatar answered Nov 09 '22 12:11

Eli