javascript - unbinding hover() - not the normal case -



javascript - unbinding hover() - not the normal case -

i have jquery that, whenever document ready, binds hover event handler element class="widget-box". issue 1 time document ready, hover event handler gets binded, when user clicks button on page, ajax used part of page reloaded , document ready causes hover event binded 1 time again same element. don't want behavior occur , want hover event binded once. i've tried unbind hover() whenever document ready gets called 1 time again unbind('mouseenter') , unbind('mouseleave') somehow, doesn't work remove hover binded. have ideas how prepare this?

thanks!

you may have done wrong. way:

$(".widget-box").unbind('mouseenter mouseleave').bind('hover', ...);

hope helps. cheers

javascript jquery hover unbind

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -