Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove $.hover event added by jQuery?

Tags:

jquery

events

I tried $.unbind('hover'), which is not working.

like image 538
Mask Avatar asked Oct 13 '09 05:10

Mask


People also ask

How do I get rid of hover?

To remove the CSS hover effect from a specific element, you can set the pointer-events property of the element (the hover behavior of which you want to disable) to “none”.

Is Hover JQuery?

The hover() is an inbuilt method in jQuery which is used to specify two functions to start when mouse pointer move over the selected element. Syntax: $(selector). hover(Function_in, Function_out);

How to call a function on mouseover in 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.


1 Answers

The hover function it's just a short-hand to bind two handlers to the mouseenter and mouseleave events, you should unbind them:

$('#item').unbind('mouseenter mouseleave'); 
like image 58
Christian C. Salvadó Avatar answered Sep 23 '22 17:09

Christian C. Salvadó