CountUP Class sandbox
How do I make an countup class sandbox?
What is a countup class sandbox? How do you make a countup class sandbox? This script and codes were developed by NaKaz on 31 August 2022, Wednesday.
CountUP Class sandbox - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CountUP Class sandbox</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div> <p id="resultTx1">1,800</p> <p id="resultTx2">2,100</p> <p id="resultTx3">01</p>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/underscore.string/2.3.3/underscore.string.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
CountUP Class sandbox - Script Codes CSS Codes
#resultTx1,
#resultTx2,
#resultTx3{ font-family: 'dinc', Arial, sans-serif; font-size: 97px; color:#999; line-height: 1.1; margin : 0; padding: 0;
}
CountUP Class sandbox - Script Codes JS Codes
(function() { (function($, win, doc, _) { var $doc, $win, CounterFunc, num, separateFigure; $win = $(win); $doc = $(doc); CounterFunc = (function() { function CounterFunc(targetID1, initial1) { this.targetID = targetID1; this.initial = initial1; this.writeElm = doc.getElementById(targetID); this.cur_Count = 0; this.end_Count = 55; this.n = 6; if (this.nowPrice !== 0) { this.nowPrice = parseInt(this.writeElm.innerHTML.replace(",", ""), 10); } this.NextPrice = initial; this.moves(); } CounterFunc.prototype.moves = function() { var cntFunc, self; self = this; cntFunc = function() { var c; if (self.cur_Count <= self.end_Count) { c = self.cur_Count++ / self.end_Count; self.writeElm.innerHTML = self.addFigures((self.NextPrice - (self.NextPrice - self.nowPrice) * Math.pow(1 - c, self.n)).toFixed(0)); return setTimeout(cntFunc, 30); } else { self.nowPrice = this.NextPrice; return self.writeElm.innerHTML = self.addFigures(self.NextPrice); } }; return cntFunc(); }; CounterFunc.prototype.addFigures = function(str) { var num, self; self = this; num = str.toString().replace(/,/g, ""); while (num != (num = num.replace(/^(-?\d+)(\d{3})/, "$1,$2"))); return num; }; return CounterFunc; })(); num = 1234567; separateFigure = function(num) { return (num + "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"); }; if (typeof console !== "undefined" && console !== null) { console.info("separateFigure:", separateFigure(num)); } if (typeof console !== "undefined" && console !== null) { console.info("toLocaleString:", num.toLocaleString()); } if (typeof console !== "undefined" && console !== null) { console.info("_.string:", _.numberFormat(num, 3)); } return $(function() { new CounterFunc("resultTx1", 234567); new CounterFunc("resultTx2", 12345); return new CounterFunc("resultTx3", 7777); }); })(jQuery, this, this.document, _.string);
}).call(this);
Developer | NaKaz |
Username | nakakaz11 |
Uploaded | August 31, 2022 |
Rating | 3 |
Size | 3,229 Kb |
Views | 34,408 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
A Pen by NaKaz | 2,669 Kb |
MVC tab TEST | 4,804 Kb |
Test OMG Particles II | 2,879 Kb |
D3.js d3.geo.projection TEST | 7,169 Kb |
D3.js su_ji_Force | 4,348 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Mosaic transition effect between two photos using jQuery | Stathisg | 2,518 Kb |
HEXAGON | Aurumlux | 1,684 Kb |
A Pen by Miro Olma | Programiro | 2,342 Kb |
CMP5-Opdracht15 | SannevanGastel | 2,733 Kb |
A Pen by Rob Levin | Roblevin | 2,787 Kb |
Scifi-style Radio-based Tab | Aaronchuo | 4,427 Kb |
About Us | Francescaedits | 1,902 Kb |
How to add Css Fold Notes In Blogger By Askwithloud.com | Askwithloud | 2,280 Kb |
Mapbox Directions with geolocation tracking | Pollardld | 5,827 Kb |
Calculator - codevember 08 - 2016 | Caiocares | 3,260 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!