Number change effects

Developer
Size
3,422 Kb
Views
48,576

How do I make an number change effects?

What is a number change effects? How do you make a number change effects? This script and codes were developed by Icebob on 12 June 2022, Sunday.

Number change effects Previews

Number change effects - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Number change effects</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container" id="rollout"> <div class="field"><span class="value">0</span><span class="newValue"></span></div> <div class="field"><span class="value">0</span><span class="newValue"> </span></div> <div class="field"><span class="value">0</span><span class="newValue"> </span></div> <div class="field"><span class="value">0</span><span class="newValue"> </span></div> <div class="field"><span class="value">0</span><span class="newValue"> </span></div> <div class="field"><span class="value">0</span><span class="newValue"> </span></div>
</div>
<div class="container" id="count"> <div class="field"><span class="value">0</span><span class="newValue"></span></div> <div class="field"><span class="value">0</span><span class="newValue"> </span></div> <div class="field"><span class="value">0</span><span class="newValue"> </span></div> <div class="field"><span class="value">0</span><span class="newValue"> </span></div> <div class="field"><span class="value">0</span><span class="newValue"> </span></div> <div class="field"><span class="value">0</span><span class="newValue"> </span></div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Number change effects - Script Codes CSS Codes

@import url(http://fonts.googleapis.com/css?family=Kelly+Slab|Graduate|Share+Tech+Mono);
html { font-family: "Kelly Slab"; font-size: 1.3em; font-weight: 700; background-color: gray; color: Black; text-shadow: 1px 1px 3px rgba(50, 50, 50, 0.8);
}
.container { display: block; height: 30px; clear: both; margin: 20px;
}
.field { position: relative; float: left; margin: 4px 10px; width: 100px; height: 30px; line-height: 30px; text-align: center; background-color: #e7e7e7; border: 1px solid #888; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; overflow: hidden;
}
span { display: block; height: 30px; /*position: absolute; left: 0px; top: 0px; */
}

Number change effects - Script Codes JS Codes

(function() { $("#rollout .field").each(function(index, item) { return setInterval(function() { var newValue, value; value = $(item).find("span.value"); newValue = $(item).find("span.newValue"); newValue.text(Math.round(parseInt(value.text(), 10) + Math.random() * 100)); return value.animate({ "margin-top": "-30px" }, 500, function() { value.text(newValue.text()); return value.css("margin-top", "0px"); }); }, Math.round(2000 + Math.random() * 2000)); }); $("#count .field").each(function(index, item) { return setInterval(function() { var inc, val, value; value = $(item).find("span.value"); val = parseInt(value.text(), 10); inc = Math.round(Math.random() * 50); return $({ someValue: val }).animate({ someValue: val + inc }, { duration: 500, easing: 'swing', step: function() { return value.text(Math.round(this.someValue)); } }); }, Math.round(2000 + Math.random() * 2000)); });
}).call(this);
Number change effects - Script Codes
Number change effects - Script Codes
Home Page Home
Developer Icebob
Username icebob
Uploaded June 12, 2022
Rating 3
Size 3,422 Kb
Views 48,576
Do you need developer help for Number change effects?

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!

Icebob (icebob) Script Codes
Create amazing web content with AI!

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!