FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Velocity_(JavaScript_library)

Velocity (JavaScript library)

{{cite web|author=julianshapiro |url=https://github.com/julianshapiro/velocity/blob/master/README.md |title=velocity/README.md at master · julianshapiro/velocity · GitHub |publisher=Github.com |date= |accessdate=2021-02-13}}</ref>"},"latest release date":{"wt":"July 31st, 2018<ref>{{cite web|url=https://github.com/julianshapiro/velocity/commits/master/package.json |title=History for package.json - julianshapiro/velocity · GitHub |publisher=Github.com |date= |accessdate=2021-02-13}}</ref>"},"programming language":{"wt":"[[JavaScript]]"},"operating system":{"wt":"[[Cross-platform]]"},"platform":{"wt":"See [[#Browser support|Browser support]]"},"genre":{"wt":"[[JavaScript library]], [[animation]]"},"license":{"wt":"[[MIT License|MIT]]<ref name=\"github1\">{{cite web|author=julianshapiro |url=https://github.com/julianshapiro/velocity/blob/master/LICENSE.md |title=velocity/LICENSE.md at master · julianshapiro/velocity · GitHub |publisher=Github.com |date=2014-10-09 |accessdate=2016-01-20}}</ref>"},"website":{"wt":"{{URL|http://velocityjs.org}}"}},"i":0}}]}'>
Velocity
Original authorJulian Shapiro
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.5.2/velocity.min.js" integrity="sha384-fcLDUAwcSMMfmpKMJ0dO2//SL2WJ5/kkyz/yvgtmLXBEp3GdqrQF9ahRerhdLXn+" crossorigin="anonymous"></script>

Usage styles

edit

Velocity has two usage styles:

  • The $.Velocity function, which is a factory method extended from the jQuery root object. This method animates raw DOM elements instead of jQuery-wrapped elements. This is the style employed when using Velocity without jQuery on the page.
  • The $element.velocity() function. This is the style used for animating jQuery element objects when jQuery is present on the page.

Animation calls in Velocity consist of supplying the desired element(s) to animate, an animation property map to specify the CSS properties to be animated, and an optional options object to specify animation settings (e.g. duration).

Arguments

edit

Velocity accepts one or more arguments. The first argument, which is required, can either be the name of a predefined Velocity command (e.g. scroll or reverse) or an object consisting of CSS properties to be animated:

  1. ↑ julianshapiro. "velocity/README.md at master · julianshapiro/velocity · GitHub". Github.com. Retrieved 2021-02-13.
  2. ↑ "JavaScript Animation". 15 June 2015.
  3. ↑ "CSS vs. JS Animation: Which is Faster?". 28 April 2014.
  4. ↑ "Search · stars:>1 · GitHub". Github.com. Retrieved 2016-01-20.
  5. ↑ "The Simple Intro to SVG Animation". 31 July 2014.
  6. ↑ Team, Awwwards. "Interview with Julian Shapiro". Awwwards.com. Retrieved 2016-01-20.
  7. ↑ Aurelio De Rosa (2014-06-23). "Easily Improving jQuery Animations". Sitepoint.com. Retrieved 2016-01-20.
  8. ↑

View original on Wikipedia | Back | FazBrowse Home