Socket
Socket
Sign inDemoInstall

noitajs

Package Overview
Dependencies
207
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    noitajs

Gives a smooth animation to your website components


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

noitajs

Build Status GitHub version [GitHub release]

Description

This library is a wrapper for the actual $.animate() jQuery function, using Promises to fulfill request without bugs or front crashe. You can create your own animations and chose to repeat it after a time you pick, it also supports the conversion of timing in milliseconds, seconds and minutes you simply set a ddeay integer and set the timing to "ms", "s" or "m" it automatically converts the integer given to the right timing.

(function($){
  $('.elem').noita({options}, callback)
})

Options

{
	repeat: false,
	repeatDelay: 300,
	repeatProps: {},
	function: 'swing',
	duration: 300,
	timing: 'ms',
	properties: {},
	init: function (elem) {},
	complete: function (settings, error) {}
}

repeat: either repeat or not the current animation (default: false). repeatDelay: when to repeat the next animatio, this property depends on the first one in case it is true (default: 300) repeatProps: in case you like to pick another animation effect to the element, if not set the first effect will be repeated function: this is similar to $.animate property 'easing' (default: 'swing'). duration: duration of the current promise. timing: duration unit could be either 'ms', 's' or 'm' (default: 'ms'). properties: string/object containing the animation efects to be executed on the element. init: call this function if you want to interfer during the start of the promise. complete: called when the promise has ended, notice that this function is called after every animation if repeat is set to true.

You can set a callback function that will replace the complete function, this callback will recieve the same attributes as the complete function.

Example

$('.elem').noita({properties: {'right':"+=1"}, duration: 5, timing: 'm', repeat: true, repeatDelay: 5000, repeatProps: {'display': none}});

Keywords

FAQs

Last updated on 06 Jan 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc