First, the events in jquery:
1. Loading the DOM:
jquery:$ (document). Ready ();
JavaScript:window.onload ();
$ (window). Load (function () {
}) is equivalent to
Window.onload = function () {}
Shorthand method:
(1) $ (document). Ready (Functon () {})
(2) $ (). Ready (Functon () {})
(3) $ (function () {})
2. Event Binding:
Bind ();
3. Synthetic Events:
(1) hover (): Used to simulate cursor hover events.
(2) Toggle (): Used to simulate a mouse continuous click event. Another function that toggles the visible state of the element.
4. Event bubbling:
Event.stoppropagation (); Stop event bubbling
Event.preventdefault (); Block default behavior
Overwrite to:
return false;
Event Capture:
jquery does not support event capture and requires the use of Javascrip native implementations.
5. Properties of the Event object:
(1) Event.type
(2) event.stoppropagation ();
(3) Event.preventdefault ();
(4) Event.target
(5) Event.relatedtarget
(6) Event.pagex, Event.pagey
(7) Event.which
(8) Event.metakey
6. Remove Events:
Unbind ();
One ();
7. Analog Operation:
Trigger ();
The 4th chapter of jquery events and animations in jquery