Giter Site home page Giter Site logo

sidfeng / jquery-animatenumber Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aishek/jquery-animatenumber

0.0 2.0 0.0 88 KB

jQuery animate number plugin

Home Page: http://aishek.github.io/jquery-animateNumber

License: MIT License

HTML 21.26% JavaScript 78.74%

jquery-animatenumber's Introduction

Code Climate

jquery-animateNumber

Demo | v0.0.13 – Latest Release

README на русском языке

jQuery numbers animation plugin, adds 'number' property and step function to jQuery's animate function properties.

Requires jQuery 1.7.0 or higher (tested with 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.10.2, 1.10.1, 1.10.0, 1.9.1, 1.9.0, 1.8.3, 1.8.2, 1.8.1, 1.8.0, 1.7.0).

Quick example

<p>Fun level <span id="fun-level" style="color: red; font-size: 0px;">0 %</span>.</p>
// animateNumber accepts same arguments, as animate does
// it adds only 'number' and 'numberStep' params
$('#fun-level').animateNumber(
  {
    number: 100,
    color: 'green', // require jquery.color
    'font-size': '50px',

    easing: 'easeInQuad', // require jquery.easing

    // optional custom step function
    // using here to keep '%' sign after number
    numberStep: function(now, tween) {
      var floored_number = Math.floor(now),
          target = $(tween.elem);

      target.text(floored_number + ' %');
    }
  },
  1800
);

All examples

Alternative plugins for same task

Development

  1. npm install grunt-cli -g
  2. npm install
  3. https://github.com/gmarty/grunt-closure-compiler
  4. grunt watch

Note on Patches / Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Send me a pull request. Bonus points for topic branches.

License

It is free software, and may be redistributed under the terms specified in the LICENSE file.

Credits

jquery-animateNumber is maintained by Cifronomika.

Contributors:

jquery-animatenumber's People

Contributors

aishek avatar nogorilla avatar xdissent avatar sunyatasattva avatar topik avatar

Watchers

James Cloos avatar Sid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.