Common events
Mouse event:
. Click ()
. Dbclick ()
. Mousedown ();
. Mouseup ();
. Mouseover ();
. Mouseout ();
. Mousemove ();
Document and window events:
. Load ();
. Resize ();
. Scroll ();
. Unload ();
Form event:
. Submit ();
. Reset ();
. Change ()
. Focus ();
. Blur ();
Note that
Replace window. onload with $ (document). Ready;
Bytes -----------------------------------------------------------------------------------------------------------------------------
Jquery events
1. Hover ()
Mouseover events and mouseout events are often used together. Here, hover () can be used to replace their mother.
$ ('# Id'). Hover (function1, function2 );
Function1 corresponds to Mouseover and function2 corresponds to mouseout
2. Toggle ()
$ ('# Id'). Toggle (function1, function2 );
Alternate functions of function1 and function2
Certificate ----------------------------------------------------------------------------------------------------------------------------------
Jquery object
$ (Document). Click (function (EVT ){
VaR x = EVT. pagex;
Var y = EVT. Pagey;
})
Block events
1. EVT. preventdefault ();
2. You can also return false in the function;
Delete event
$ ('# Id'). Unbind ('click ');
Bind event
$ ('# Id'). BIND ('click', mydate, functionname );