jQuery unbind('hover') does not work -


this question has answer here:

my unbind not work.

$("img.hoverable").hover(changeimage, changeback); $("a img.hoverable").unbind('hover'); 

the html this

<img class="hoverable" src="something.jpg"/> <a href="#"><img class="hoverable" src="something.jpg"/></a> 

when hover on second html, changeimage still fired.

i not sure if using correctly, can please advise?

try

$("img.hoverable").unbind('mouseenter mouseleave'); 

the .hover() method binds handlers both mouseenter , mouseleave events. inorder unbind have unbind mouseenter , mouseleave.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -