An open API service indexing awesome lists of open source software.

https://github.com/bttmly/jquery.promise-transitions


https://github.com/bttmly/jquery.promise-transitions

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

jquery.promise-transitions
==========================

A jQuery plugin with modified methods mirroring `.addClass()`, `.removeClass()`, and `.toggleClass()` but that instead return promises that resolve once transition changes complete.

There are some serious shortcomings in the TransitionEvent API, including, most notably, the complete lack of anything like TransitionStart. Use with caution! If you add/remove/toggle a class that doens't change any transitioning properties, but the element does have a `transition-duration`, the promise will never resolve (because there is no way to check if a transition has started).