jQuery Mouse Events
Last Updated Jul 21, 2015, 12:00:06 PM
jQuery Mouse hover() Event
jQuery mouse hover()
event is used to bind more than one handlers to the matched elements and then it will be executed when the mouse pointer enters and leaves the HTML
elements.
The jQuery hover()
event method will bind the handlers on both mouseenter and mouseleave events.
In this example, blue stars(*****) will be displayed as a result when user mouse over on HTML li
elements.
Try It Now
jQuery mouseup() Event
jQuery mouseup()
event is used to bind an event handler to the javascript “mouse up” event.
Example
In the above example when the user press the mouseup then the jquery event gets triggered
OutputTry It Now
jQuery mousdown() Event
jQuery mousedown()
event is used to bind event handler to the javascript “mouse down” event.
Example
In the above example when the user press the mousedown then the jquery event gets triggered
OutputTry It Now
jQuery mouseenter() Event
jQuery mousesenter()
event is used to bind an event handler to be executed when the mouse enters the HTML
element.
Example
In the above example we can analyse when the mouse down and mouse up event occurs when press and releases on an HTML element.
OutputTry It Now
jQuery mousemove() Event
jQuery mousemove()
event in jquery is used to bind an event handler to the javascript “mousemove” event.
jQuery mousemove()
method behaviour can also be performed by .on( "mousemove", handler ) and .trigger( "mousemove" ). Basically mousemove() event will be fired when mouse pointer moves inside the element.
In the above example, we can analyse when the mousedown and mouseup event occurs when mouse moves inside the html element.
OutputTry It Now
Other Advanced jQuery Events you might want to learn
jQuery Complete Events Reference
jQuery Events
jQuery Document Events
jQuery Keyboard Events
jQuery Mouse Events
Sources and Credits
The content and methods in the tutorial has been referred and updated with jQuery API and The jQuery Foundation
Last Updated Jul 21, 2015, 12:00:06 PM
Learning 200 jQuery Functions with 800 Examples -Udemy
Learn jQuery in One Month - from OneMonth
The Ultimate Web Development Course -Udemy
Learn jQuery: An In-depth Course For Beginners -Udemy