
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
animate-helper
Advanced tools
Provide functions to handle animations and transitions gracefully. Execute a function before or after playing a css animation on an element.
Provide functions to handle animations and transitions gracefully. Execute a function before or after playing a css animation on an element.
Setting up is pretty straight-forward. Just download the script from dist folder and include it in your HTML:
<script type="text/javascript" src="path/to/dist/animation-helper.min.js"></script>
Require Bundle is also available on NPM:
$ npm install animate-helper
Call the function AnimateHelper.doThenAnimate( element, animationClass, callbackFn );
passing the parameters:
element
: The element to which the animation class will be added and the animation played onanimationClass
: The class name for the animation which should have the css property animation:
set to a css keyframe animation definition.callbackFn
: The function to execute before the animation is played, accepts the parameters element
and animationClass
.// Set element open then play openning animation
AnimateHelper.doThenAnimate( document.querySelector( '.flyout-menu' ), 'slide-up', function( element, animationClass ) {
element.style.display = 'block';
document.body.classList.add( 'flyout-menu--open' );
} );
Call the function AnimateHelper.animateThenDo( element, animationClass, callbackFn );
passing the parameters:
element
: The element to which the animation class will be added and the animation played onanimationClass
: The class name for the animation which should have the css property animation:
set to a css keyframe animation definition.callbackFn
: The function to execute after the animation is played (animationend
event), accepts the parameters element
and animationClass
.// Play closing animation then set element hidden
AnimateHelper.animateThenDo( document.querySelector( '.flyout-menu' ), 'slide-down', function( element, animationClass ) {
element.style.display = 'none';
document.body.classList.remove( 'flyout-menu--open' );
} );
This isn't a large project by any means, but you are definitely welcome to contribute.
Clone the repo and run npm install:
$ cd path/to/animate-helper
$ npm install
Run the build command:
$ gulp build
Build on file save:
$ gulp
$ gulp watch
Licensed under MIT.
FAQs
Provide functions to handle animations and transitions gracefully. Execute a function before or after playing a css animation on an element.
The npm package animate-helper receives a total of 0 weekly downloads. As such, animate-helper popularity was classified as not popular.
We found that animate-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.