Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

counterup2.js cdn

 <!-- jquery js -->
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
 <!-- waypoint js -->
 <script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js"></script>
 <!-- counter up2 js -->
 <script src="https://cdnjs.cloudflare.com/ajax/libs/counterup2/2.0.2/index.js"></script>

// counter up 2 js initialize
	jQuery(function ($) {
		'use strict';
		var counterUp = window.counterUp['default']; // import counterUp from "counterup2"
		var $counters = $('.counter');
		/* Start counting, do this on DOM ready or with Waypoints. */
		$counters.each(function (ignore, counter) {
			var waypoint = new Waypoint({
				element: $(this),
				handler: function () {
					counterUp(counter, {
						duration: 5000,
						delay: 16,
					});
					this.destroy();
				},
				offset: 'bottom-in-view',
			});
		});
	});




//counterup js plugin old version use this code 


//jquery cdn
<script src=" https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js "></script>

//waypoint cdn
<script src=" https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js "></script>

//counterup cdn
<script src=" https://cdnjs.cloudflare.com/ajax/libs/Counter-Up/1.0.0/jquery.counterup.min.js "></script>

// counterup inint

	$('.counter1').counterUp({
      delay: 20,
      time: 1500,
    });

Comment

PREVIOUS NEXT
Code Example
Javascript :: remove localstorage 
Javascript :: how to remove item from asyncstorage 
Javascript :: explode in jquery 
Javascript :: javascript open page in same tab 
Javascript :: get random number with min and max 
Javascript :: javascript remove extension from filename 
Javascript :: How to get current URL with Javascript or React 
Javascript :: generate random character in javascript 
Javascript :: node js create folder 
Javascript :: disable right click javascript 
Javascript :: how to get last path from url in javascript 
Javascript :: authfunctions react 
Javascript :: 1line uuid 
Javascript :: addeventlistener hover js 
Javascript :: javascript disable right click 
Javascript :: js check for url parameter 
Javascript :: javascript get number of elements in object 
Javascript :: react js installation 
Javascript :: js is empty object 
Javascript :: math random equitative js 
Javascript :: Extract number from string javascripy 
Javascript :: ng serve host 0.0.0.0 
Javascript :: how to get name array value in jquery 
Javascript :: add comma to number javascript 
Javascript :: fetch get authorization header 
Javascript :: jquery remove element by id 
Javascript :: javascript write in id 
Javascript :: react native seperator code 
Javascript :: refresh page in next js 
Javascript :: ajax header jquery 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =