jQuery mouseup: Main Tips
- The jQuery
.mouseup()
binds an event handler tomouseup
event, or triggers the event. - The
mouseup
event happens when the mouse button is released while the cursor is still over the element.
Usage of .mouseup() Method
The jQuery .mouseup()
sets an event handler, running a function when the mouseup
event occurs. The method can invoke the event as well.
Try clicking on the text in the example. If you release the button while still on the text, a message will appear beneath it:
Use this syntax to trigger the mouseup
event:
$("selector").mouseup();
Add the function
parameter to attach the event handler:
$("selector").mouseup(function);
Tip: to make jQuery get mouse position, use event.pageX and event.pageY.
Latest Udacity Coupon Found:
Verified STAFF PICK
75% OFF COURSES
Udacity Black Friday Offer
The best time to save on Udacity courses is now - follow this coupon to access a 75% Udacity Black Friday discount & enjoy learning at a very low cost!
Expiration date: 28/01/2021
3176 People Used
Only 97 Left