Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

effected

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

effected

animation events use as Promises

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

effected.js

animation events use as Promises or callback

Installation

$ npm install effected

Usage

<script src="effected.min.js"></script>

Example

effected(element).then(function() {
  // end CSS3 animation
  console.log('end of animation');

  element.classList.remove('js-animation-move');
});

// start CSS3 animation
element.classList.add('js-animation-move');

Functions

effected(element[, eventType][, callback])

  • element
    • HTMLElement
  • eventType
    • String
  • callback
    • Function

for animationend, transitionend or animationstart.

return Promise if not passed callback, but throw error if cannot use Promise.

values for eventType are below:

  • animationstart
    • add to animationstart
  • animation|animationend
    • add to animationend
  • transition|transitionend
    • add to transitionend
  • any other
    • add to animationend and transitionend

effected.iterated(element, callback)

  • element
    • HTMLElement
  • callback
    • Function

for animationiteration.

effected.effected

alias of effected().

effected.Promise

effected use native Promise if the browser has it. if you want to use third party Promises library, set to this property.

License

The MIT license. Please see LICENSE file.

FAQs

Package last updated on 06 Apr 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc