
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
Anim is a tiny and bare bones animation library weighing in at 7 KB in plain code, 2.8 KB when minified and 1.5 KB when gzipped.
Why Anim? Because sometimes if you only want a little animation, you may not want to pull in a full fledged library like jQuery which is 90 KB minified and 32 KB gzipped.
Anim can animate any property that accepts number and color values including but not limited to backgroundColor, opacity, width, scrollTop, etc.
http://relay.github.com/anim_demo.html
anim(---).anim(---).anim(---)anim("div1", {opacity: 0.6}, 2)anim(node, properties, duration, ease*)
or anim(delay)
or anim(callbackFunction)
The properties object takes the form of:
{cssName: endValue} or {cssName: {to:endValue, fr:startValue*, e:easingFunction*, u:units*}}
This function returns an object with one method ("anim"), which allows you to start another animation after the first one is done. If that second function is called with one parameter, it is assumed to be a callback function and is called after the last animation is done.
anim(box, {opacity: {to: 0.2, fr: 1}}, 2); //long form specifying 'to' and 'from'
anim(box, {opacity: 0.2}, 2);
anim(box, {height: 300}, 2, "ease-in");
anim(box, {height: "14em", width: "14em"}, 2);
anim(box, {marginLeft: "2%", fontSize: "20px"}, 2, "ease-out");
anim(document.body, {scrollTop: 500}, 5, "lin");
run 2 animations one after the other
anim(box, {height:300}, 2)
.anim(box, {width:300}, 2)
.anim(function() { alert("all done") });
run 2 animations with a 1 second delay in between
anim(box, {height:300}, 2)
.anim(1)
.anim(box, {width:300}, 2);
Supports IE6+, Firefox 2+, Chrome, iOS, Android
If requestAnimationFrame is available it is used, which provides the highest frame rate and throttling if the CPU is busy or if another tab is focused.
FAQs
Tiny animation library
We found that relay-anim 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.