Jquery events and objects

Source: Internet
Author: User

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 );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.