OhhMuaOhhMua
  • Home
  • WordPress
    • Solutions & Troubleshooting
    • Installation & Setup
    • Themes & Plugins
    • Security
  • Tools
    • veo3 prompt generator
  • Our Team
  • Hosting
    • Best Web Hosting
    • Free Web Hosting
    • VPS Hosting
Reading: Create a Simple Incrementing Number Effect with HTML and JavaScript
Notification Show More
OhhMuaOhhMua
  • WordPress
  • Entry-level Builds
  • High-end Builds
  • Mid-range Builds
  • Hardware Tips
  • Software Tips
Search
  • Home
  • WordPress
    • Installation & Setup
    • Security
    • Solutions & Troubleshooting
    • Themes & Plugins
  • Tools
    • veo3 prompt generator
  • Our Team
    • Hosting
Follow US
Copyright © 2024 ohhmua. All rights reserved.
OhhMua > Blog > WordPress > Solutions & Troubleshooting > Create a Simple Incrementing Number Effect with HTML and JavaScript
Solutions & Troubleshooting

Create a Simple Incrementing Number Effect with HTML and JavaScript

Admin (Nghia Vo)
Last updated: September 17, 2024 4:14 pm
Admin (Nghia Vo)
Share
3 Min Read
Create a Simple Incrementing Number Effect with HTML and JavaScript 2
Create a Simple Incrementing Number Effect with HTML and JavaScript 2
SHARE
Contents
Step 1: Create the number with HTMLStep 2: Copy the JavaScript code

Hello everyone, during my web development journey, I often encounter client requests to display data with an increasing number effect, which makes the website more dynamic and engaging. Today, I will share with you a very simple way to create an incrementing number effect using HTML and JavaScript!

Create a Simple Incrementing Number Effect with HTML and JavaScript 2
Create a Simple Incrementing Number Effect with HTML and JavaScript

This tutorial uses the Flatsome theme, so if you are using the Flatsome theme, you can follow it exactly. If you’re using a different theme, you might need to tweak the code or the steps to make it work for your setup.

Step 1: Create the number with HTML

Using the UX Builder in the Flatsome theme, edit the page and insert a custom HTML block by following the instructions as shown in the image below:
Create your desired HTML code, consisting of two separate parts: the running number part and the explanation part, as shown in the image. The running number part will have the class "item-number" and the attribute data-count="desired final number". Just follow this format and change the number as needed! (the part highlighted in green).

Create a Simple Incrementing Number Effect with HTML and JavaScript 3
Create a Simple Incrementing Number Effect with HTML and JavaScript 
<p style="text-align: center;">
  <strong class="item-number" id="number_1" data-count="7">7</strong><br />
  Instructional article from ohhmua.com, thank you for watching
</p>

Step 2: Copy the JavaScript code

Go to the Advanced settings in Flatsome – Global Setting – Footer Script, and copy and paste the following code into that section.

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script><br />
<script>$('.item-number').each(function () {$(this).prop('item-number',0).animate({Counter: $(this).text()}, {duration: 7000,easing: 'swing',step: function (now) {$(this).text(Math.ceil(now));}});
});</script>
Create a Simple Incrementing Number Effect with HTML and JavaScript 1
Create a Simple Incrementing Number Effect with HTML and JavaScript

Please note, if you want the number to run slower, you can adjust the value in the duration:7000 section!

480520387 657957633334779 6814038772835954285 n
Admin (Nghia Vo)

Hi, I’m Nghia Vo: a computer hardware graduate, passionate PC hardware blogger, and entrepreneur with extensive hands-on experience building and upgrading computers for gaming, productivity, and business operations.
As the founder of Vonebuy.com, a verified ecommerce store under Vietnam’s Ministry of Industry and Trade, I combine my technical knowledge with real-world business applications to help users make confident decisions.

I specialize in no-nonsense guides on RAM overclocking, motherboard compatibility, SSD upgrades, and honest product reviews sharing everything I’ve tested and implemented for my customers and readers.

You Might Also Like

Headless vs Traditional WooCommerce: Which Architecture Wins?

Can AI Agents Safely Access Your WordPress Site?

Is WordPress Dead or Still Powering the Web in 2026?

WordPress 6.9.2 Disaster: Why You Should Never Auto-Update Immediately

Headless WordPress Explained: Is It Right for Your Site?

TAGGED:HTML and JavaScript
Share This Article
Facebook Twitter Email Print
By Admin (Nghia Vo)
Follow:
Hi, I’m Nghia Vo: a computer hardware graduate, passionate PC hardware blogger, and entrepreneur with extensive hands-on experience building and upgrading computers for gaming, productivity, and business operations. As the founder of Vonebuy.com, a verified ecommerce store under Vietnam's Ministry of Industry and Trade, I combine my technical knowledge with real-world business applications to help users make confident decisions. I specialize in no-nonsense guides on RAM overclocking, motherboard compatibility, SSD upgrades, and honest product reviews sharing everything I’ve tested and implemented for my customers and readers.
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Trending

Optimized Pagination thumbnail
Solutions & Troubleshooting

How I Optimized Pagination and Skyrocketed Traffic

April 28, 2025
My Google Discover traffic skyrocketed after I did these 10 things
Solutions & Troubleshooting

My Google Discover traffic skyrocketed after I did these 10 things

May 14, 2025
Discovered – Currently Not Indexed in Google Search Console
Solutions & Troubleshooting

Discovered – Currently Not Indexed in Google Search Console: What It Means & How to Fix It

May 25, 2025
Headless WordPress Explained
Solutions & Troubleshooting

Headless WordPress Explained: Is It Right for Your Site?

March 10, 2026
Guide to Using Multiple Domains for One WordPress Website
Solutions & Troubleshooting

Guide to Using Multiple Domains for One WordPress Website

September 16, 2024
Title and Meta Description Mismatch on Google
Solutions & Troubleshooting

Title and Meta Description Mismatch on Google[How to fix]

September 25, 2024
Previous Next

You Might Also Like

WordPress 7.0 Finally Fixes 20 Years of Painful Collaboration Problems
Solutions & Troubleshooting

WordPress 7.0 Finally Fixes 20 Years of Painful Collaboration Problems

Admin (Nghia Vo) Admin (Nghia Vo) March 9, 2026
HETZNER HOSTING
Solutions & Troubleshooting

Why Hetzner Might Not Be the Right Choice for Beginners

Admin (Nghia Vo) Admin (Nghia Vo) March 7, 2026
wordpress speed 2026
Solutions & Troubleshooting

WordPress Speed in 2026: The Only Hosting Checklist You Need

Admin (Nghia Vo) Admin (Nghia Vo) March 7, 2026
What Happens When Web Hosting Companies Get Acquired
Solutions & Troubleshooting

What Happens When Web Hosting Companies Get Acquired

Admin (Nghia Vo) Admin (Nghia Vo) March 6, 2026
wordpress shortcode 1
Solutions & Troubleshooting

WordPress Shortcodes: Complete Guide to Dynamic Content

Admin (Nghia Vo) Admin (Nghia Vo) March 4, 2026
How to Make Google Understand and Value Your Content
Solutions & Troubleshooting

SEO in the Age of AI: How to Make Google Understand and Value Your Content

Admin (Nghia Vo) Admin (Nghia Vo) June 5, 2025
Previous Next
newsletter featured

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!

Follow US on Social Media

Facebook Youtube Steam Twitch Unity

Copyright © 2024 ohhmua. All rights reserved.

OhhMua

Information

  • About
  • Terms & Conditions
  • Privacy Policy
  • Editorial Standards
Welcome Back!

Sign in to your account

Lost your password?