/pfx-transition

Browser prefix helper for transition event

Primary LanguageJavaScriptMIT LicenseMIT

pfx-transition Build Status

Browser prefix helper for transition event

Install

$ npm install --save pfx-transition

Usage

const transition = require('pfx-transition');

const slides = document.querySelectorAll('.slide');
slides.forEach(slide => {
	slide.addEventListener(transition.end, () => {
		// the transition has finished
	}, false);
});

API

transition

Object containing two properties, start and end, that map to transitionstart and transitionend, respectively, and include the correct vendor transition prefix (if needed).

License

MIT © Alex Cross