tristen / hoverintent

:mouse: Fire mouse events when a user intends it
https://tristen.ca/hoverintent/
MIT License
331 stars 54 forks source link

Return hoverintent object from options #15

Closed neagle closed 8 years ago

neagle commented 8 years ago

This tripped me up big time at work yesterday: I was using hoverintent happily, and was using an array to save references to hoverintent objects so I could remove them later.

I later added an .options call to adjust the sensitivity, and discovered when I came in this morning that things had broken badly: event listeners were piling up because they were no longer being removed properly. I discovered that it was because as soon as I added .options, the reference I was saving was undefined.

This commit also adds the invaluable .remove() to the README.

neagle commented 8 years ago

Sorry for not leading with this: thanks for the project! Hoverintent is a vital interaction, IMO, and I was delighted to find a jQuery-free version on NPM.

tristen commented 8 years ago

@neagle :+1: Totally solid pr thanks!

neagle commented 8 years ago

Thank you!

Nate Eagle

On Apr 12, 2016, at 7:32 PM, Tristen notifications@github.com wrote:

Merged #15.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub