gnat / surreal

🗿 Mini jQuery alternative. Dependency-free animations. Locality of Behavior. Use one element or arrays transparently. Pairs with htmx. Vanilla querySelector() but better!
https://gnat.github.io/surreal/example.html
MIT License
1.2k stars 24 forks source link

fix: callback checks for fadeIn/fadeOut not using typeof #25

Closed klausborges closed 4 months ago

klausborges commented 4 months ago

Hi,

This library seems pretty cool! I did manage to find a couple of issues while doing some testing, this one was worth opening up a quick PR to fix since provided callbacks aren't running for fadeIn and fadeOut due to an incorrect check

There's another issue I found when using me().on('mouseleave', ...) which I may file an issue later, seems to be related to #3

Let me know if there's anything I need to check here, hopefully we can get this merged!

Thanks

gnat commented 4 months ago

Thank you for catching this and thank you for the kind words!

klausborges commented 4 months ago

Thanks @gnat!