I am using raphael.js library and this file contains a mouseover event which I want to stop working. Can anyone help me?
This method is a shortcut for .on ( "mouseover", handler ) in the first two variations, and .trigger ( "mouseover" ) in the third. The mouseover event is sent to an element when the mouse pointer enters the element. Any HTML element can receive this event.
(Make sure Hover effect should be added by JQuery only, Hover effect added by CSS doesn’t work here). Use either .unbind () or .off () method. Pass the events that we want to turn off for that particular element. Example 1: This example using the .unbind () method. How to unbind “hover” event using JQuery?
The mouseover () method triggers the mouseover event, or attaches a function to run when a mouseover event occurs. Note: Unlike the mouseenter event, the mouseover event triggers if a mouse pointer enters any child elements as well as the selected element.
jQuery not only allows us to attach event handlers on the element and it also allows us to take control of the flow of the events. You can enable and disable an event whenever you want in your script.
You could use CSS:
.element {
pointer-events: none;
}
Or something like:
$('.element').on('mouseover mouseenter mouseleave mouseup mousedown', function() {
return false
});
I don't know from what you want to prevent that event from triggering something, please be more specific on your questions and provide more relevant information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With