Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jquery.counterup

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery.counterup

jquery.counterup is a lightweight jQuery plugin that counts up to a targeted number when the number becomes visible.

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.6K
decreased by-24.48%
Maintainers
1
Weekly downloads
 
Created
Source

jquery.counterup

jquery.counterup is a jQuery plugin that animates a number from zero (counting up towards it). It supports counting up:

  • integers 12345
  • floats 0.1234
  • formatted numbers 1,234,567.00

Features:

  • Auto-detect for integers, floats or formatted numbers
  • The plugin will also use the number of decimal places the original number is using.
  • Start counter with a different duration and delay by setting data-counterup-time="" and data-counterup-delay=""
  • Lightweight: ~1kb
  • Minimal setup

Requires waypoints.js

Demo

DEMO

Install with Bower

bower install jquery.counterup

=====

Include

<script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.0/jquery.waypoints.min.js"></script>
<script src="jquery.counterup.min.js"></script>
Using with a CDN:

CDN provided by jsDelivr CDN

<script src="//cdn.jsdelivr.net/jquery.counterup/1.0/jquery.counterup.min.js"></script>

HTML

With default values from plugin instantiation.

<span class="counter">1,234,567.00</span>
<span>$</span><span class="counter">1.99</span>
<span class="counter">12345</span>

With values from data attribute.

<span class="counter" data-counterup-time="1500" data-counterup-delay="30">1,234,567.00</span>

jQuery

$('.counter').counterUp();

or with extra parameters

$('.counter').counterUp({
    delay: 10,
    time: 1000
});

delay - The delay in milliseconds per number count up

time - The total duration of the count up animation

Keywords

FAQs

Package last updated on 24 Mar 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc