Socket
Book a DemoInstallSign in
Socket

css-emitter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-emitter

fire events on css transition and animation completion by @ecarter

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

css-emitter

fire events on css transition and animation completion

Installation

$ component install ecarter/css-emitter

Example

Styles:

#box {
  transition: all 1s ease;
  -webkit-transition: all 1s ease;
  -moz-transition: all 1s ease;
  -o-transition: all 1s ease;
  width: 100px;
  height: 100px;
  background: black;
  display: block;
}
#box.in {
  width: 200px;
  height: 200px;
}

Script:

var cssEvent = require('css-emitter');
var element = document.querySelector('#box');

css = cssEvent(element);

css.on('end', function(e){
  console.log(e);
});

setTimeout(function(){
  element.className = 'in';
}, 1000);

License

MIT

Keywords

css

FAQs

Package last updated on 23 Feb 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts