On Transition End
Cross-browser transtionend
event listener:
;// orconst onTransitionEnd = windowonTransitionEnd; const element = document;const expectedDuration = 1000; // callback:; // promise: ; // es7 await:await ;console;
Demo
http://codepen.io/jshanson7/pen/avEZry?editors=001
Installation
npm install on-transition-end
Then reference either dist/on-transition-end.js
or dist/on-transition-end.min.js
in your html, or import on-transition-end
. If a module environment is not detected, onTransitionEnd
will be exported to window.onTransitionEnd
.
Contributing
Clone repo, cd into it.
npm install && npm start
Building
npm run build
Testing
Run the tests on your browser here.
npm test && npm run test-browser
License
MIT