Jquery mouse event, jquery mouse

Source: Internet
Author: User

Jquery mouse event, jquery mouse

Click ()
Bind an event processing function to a click event or trigger an element click event.
. Click (handler (eventObject ))
Handler (eventObject)
The function that is executed when an event is triggered.
. Click ([eventData], handler (eventObject ))
EventData
An object that contains data key-value ing will be passed to the event handler.
Handler (eventObject)
The function that is executed when an event is triggered.
. Click ()
This method does not accept any parameters.
Usage:
Trigger the click Event on all sections on the page
$ ("P"). click ();


. Dblclick ()
Bind an event handler function to a double-click event, or trigger an element double-click event.
. Dblclick (handler (eventObject ))
Handler (eventObject)
The function that is executed when an event is triggered.
. Dblclick ([eventData], handler (eventObject ))
EventData
An object that contains data key-value ing will be passed to the event handler.
Handler (eventObject)
The function that is executed when an event is triggered.
. Dblclick ()
This method does not accept any parameters.
Usage:
Trigger the dblclick event on all sections on the page
$ ("P"). dblclick ();
$ ('# Target'). dblclick (function (){
Alert ('handler for. dblclick () called .');
});


. Focusin ()
Bind an event function to a focal point event.
. Focusin (handler)
Handler
The function that will be executed from each event.
. Focusin ([eventData], handler)
EventData
An object that contains the data key-Value Pair ing will be passed to the event handler.
Handler
The function that will be executed from each event.
Usage:
$ ("P"). focusin (function (){
$ (This). find ("span" cmd.css ('display', 'inline'). fadeOut (1000 );
}); // Execute this function when the focus is obtained in p.


. Focusout ()
Bind an event function to an event with no focus.
. Focusout (handler)
Handler
The function that will be executed from each event.
. Focusout ([eventData], handler)
EventData
An object that contains the data key-Value Pair ing will be passed to the event handler.
Handler
The function that will be executed from each event.
Usage:
$ ("P"). focusout (function (){
$ (This). find ("span" cmd.css ('display', 'inline'). fadeOut (1000 );
}); // Execute this function when the focus is lost in p.


. Hover ()
Bind the two time functions to the matching element, which is executed when the mouse pointer enters and leaves the element.
. Hover (handlerIn (eventObject), handlerOut (eventObject ))
HandlerIn (eventObject)
The event function that is triggered when the mouse pointer enters the element.
HandlerOut
The event function that is triggered when the mouse pointer leaves the element.
Usage:
$ ("Td"). hover (
Function (){
$ (This). addClass ("hover ");
},
Function (){
$ (This). removeClass ("hover ")
}
);
When you move the mouse back and forth in the table cell, add a special style,
Unbind:
$ ("Td"). unbind ('mouseenter mouseleave ');


. Mousedown ()
The event handler function that is bound when you press the mouse to trigger the event.
. Mousedown (handler (eventObject ))
HandlerIn (eventObject)
The function that is executed when each event is triggered.
. Mousedown ([eventData], handler (eventObject ))
EventData
An object that contains the data key-Value Pair ing will be passed to the event handler.
Handler (eventObject)
The function that is executed when an event is triggered.
. Mousedown ()
This method does not accept any parameters.
Usage:
$ ('# Target'). mousedown (function (){
Alert ('handler for. mousedown () called .');
});


. Mouseenter ()
The event triggered when the mouse pointer enters the element that passes through.
. Mouseenter (handler (eventObject ))
Handler (eventObject)
The function that is executed when an event is triggered.
. Mouseenter ([eventData], handler (eventObject ))
EventData
An object that contains the data key-Value Pair ing will be passed to the event handler.
Handler (eventObject)
The function that is executed when an event is triggered.
Usage:
$ ("P"). mouseenter (function (){
$ ("P" ).css ("background-color", "yellow ");
});

 

. Mouseleave ()
Event triggered when the mouse pointer leaves the element.
. Mouseleave (handler (eventObject ))
Handler (eventObject)
The function that is executed when an event is triggered.
. Mouseleave ([eventData], handler (eventObject ))
EventData
An object that contains the data key-Value Pair ing will be passed to the event handler.
Handler (eventObject)
The function that is executed when an event is triggered.
Usage:
$ ("P"). mouseleave (function (){
$ ("P" ).css ("background-color", "yellow ");
});


. Mousemove ()
An event is triggered when the mouse pointer moves in the specified element.
. Mousemove (handler (eventObject ))
Handler (eventObject)
The function that is executed when an event is triggered.
. Mousemove ([eventData], handler (eventObject ))
EventData
An object that contains the data key-Value Pair ing will be passed to the event handler.
Handler (eventObject)
The function that is executed when an event is triggered.
Usage:
$ (Document). mousemove (function (e ){
$ ("Span"). text (e. pageX + "," + e. pageY );
});


. Mouseout ()
The function triggered when the mouse pointer leaves the element.
. Mouseout (handler (eventObject ))
Handler (eventObject)
The function that is executed when an event is triggered.
. Mouseout ([eventData], handler (eventObject ))
EventData
An object that contains the data key-Value Pair ing will be passed to the event handler.
Handler (eventObject)
The function that is executed when an event is triggered.
Usage:
$ ("P"). mouseout (function (){
("P" ).css ("background-color", "# E9E9E4 ");
});


. Mouseover ()
Event triggered when the cursor is over the element.
. Mouseover (handler (eventObject ))
Handler (eventObject)
The function that is executed when an event is triggered.
. Mouseover ([eventData], handler (eventObject ))
EventData
An object that contains the data key-Value Pair ing will be passed to the event handler.
Handler (eventObject)
The function that is executed when an event is triggered.
Usage:
$ ("P"). mouseover (function (){
$ ("P" ).css ("background-color", "yellow ");
});


. Mouseup ()
Event triggered when the squirrel button is placed on the element.
. Mouseup (handler (eventObject ))
Handler (eventObject)
The function that is executed when an event is triggered.
. Mouseup ([eventData], handler (eventObject ))
EventData
An object that contains the data key-Value Pair ing will be passed to the event handler.
Handler (eventObject)
The function that is executed when an event is triggered.
Usage:
$ ("Button"). mouseup (function (){
$ ("P"). slideToggle ();
});

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.