jQuery unbind('hover') does not work -
this question has answer here:
- how unbind “hover” in jquery? 8 answers
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
Post a Comment