Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Applies a transitive class that gets removed after a CSS transition ends.
JavaScript HTML Makefile
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
History.md
Makefile
Readme.md
component.json
demo.html
index.js
package.json

Readme.md

class-transition

Applies a transitive className that gets removed upon a CSS transition completing or a timeout executing as a fallback.

Example

var transition = require('class-transition');
var el = document.getElementById('subject');
transition(el, 'highlight', '500ms');

API

transition(class, time)

Applies the given class. time is passed to the ms component, so it can be 500 or '500ms' or '0.5s'.

Note: if only support for browsers with CSS transitions is needed, the time parameter can be omitted.

License

MIT

Something went wrong with that request. Please try again.