briancherne / jquery-hoverIntent

hoverIntent jQuery Plug-in
https://briancherne.github.io/jquery-hoverIntent/
MIT License
826 stars 253 forks source link

Most recent hoverIntent initialisation break previous ones. #35

Closed roydukkey closed 9 years ago

roydukkey commented 9 years ago

HoverIntent blows away all previous initialisation.

http://jsfiddle.net/7px1e2kd/1/

usmonster commented 9 years ago

Ooh, yeah, that's a bug, and possibly the same as (or maybe at least related to) #28.

My guess is that it's because the timeout ID is stored on the element, which means it can be unexpectedly overwritten if hoverIntent was invoked more than once on the same element... I'll take a look. Thanks for reporting it!

usmonster commented 9 years ago

After finally having some time to look further into this, I can confirm that the bug is indeed a result of how certain state information is stored per-element when it really should be per-instance-per-element. (Also it's completely unrelated to #28.) Fix forthcoming!

usmonster commented 9 years ago

@roydukkey would you care to take a look at #39 and see if it fixes your problem (and doesn't cause new ones)? Feel free to leave comments on the pull request.