jQuery event binding

Event binding

Simple operation of jquery event:

  • $().Event type(function Event handling);

  • $().Event type();


##1. jquery event binding

$().bind(event type, function event handling);

$ ().bind(Type 1 Type 2 Type 3, event processing); //Bind the same process to many different types of events

$().bind(json object); //Bind at the same time Multiple different types of events

(Event type: click mouseover mouseout focus blur, etc.)

Event processing: named function, anonymous function

   php.cn     

1.2 Cancel event binding

① $().unbind(); //Cancel all events

② $().unbind(event type); //Cancel events of the specified type

③ $().unbind(event type, processing); //Cancel the specified processing event of the specified type

Note: For the ③ type of cancellation of event binding, the event processing must be a named function.

   php.cn     

Event binding is just a form of rich event operations.

Continuing Learning
||
php.cn
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!