How can I check if an element is being hovered over and/or clicked on and/or dragged? I need this info so I can stop infinite loops for the duration of the drag.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use jQuery UI’s Draggables feature. It allows you to set a callback function for when the drag starts. Documentation is at http://jqueryui.com/demos/draggable/#event-start. It also has a callback for during a drag.
You can already set callback functions for hover and click via jQuery’s click() and mouseover() events. http://docs.jquery.com/Events