OhhMuaOhhMua
  • Home
  • Hosting
    • Best Web Hosting
    • Free Web Hosting
    • VPS Hosting
  • WordPress
    • Solutions & Troubleshooting
    • Installation & Setup
    • Themes & Plugins
    • Security
  • Build PC
    • High-end Builds
    • Mid-range Builds
    • Entry-level Builds
  • Computer
    • Computer Hardware
      • CPU (Processors)
      • GPU (Graphics Cards)
      • Motherboards
      • RAM (Memory)
      • Storage (SSD & HDD)
      • PSU (Power Supply Units)
      • Cases & Cooling
      • Monitors & Peripherals
    • Computer Tips
      • Hardware Tips
      • Software Tips
    • PC Troubleshooting
    • Gaming Errors & Solutions
  • Coupons & Deals
  • Tools
    • veo3 prompt generator
Reading: Create a Simple Incrementing Number Effect with HTML and JavaScript
Notification Show More
OhhMuaOhhMua
  • Computer Tips
  • Hosting
  • WordPress
Search
  • Home
  • WordPress
    • Installation & Setup
    • Security
    • Solutions & Troubleshooting
    • Themes & Plugins
    • Troubleshooting
  • Hosting
    • Free Web Hosting
    • VPS Hosting
    • Best Web Hosting
  • Computer Tips
    • PC Troubleshooting
    • Gaming Errors & Solutions
    • Computer Hardware
  • Coupons & Deals
  • veo3 prompt generator
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

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

Cannot Fetch Sitemap in Google Search Console

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

Why 2 Backlinks per Article Might Be Killing Your SEO

What is Obsidian? Why Developers Love This Note-Taking App

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

How to Fix Red Alert 2 Black Screen Issue on Windows 10,11
Gaming Errors & Solutions

How to Fix Red Alert 2 Black Screen Issue on Windows 10,11

September 18, 2024
WordPress Covers Every Website Type
Solutions & Troubleshooting

Blog, E-Commerce, or Forum? WordPress Covers Every Website Type!

April 29, 2025
OLD PC 2013
Entry-level Builds

Evaluating a 2013 Gaming PC for 2025: Is It Still Up to the Task?

July 22, 2025
Windows vs macOS vs Linux The Ultimate OS Showdown for 2025
Software Tips

Windows vs macOS vs Linux: The Ultimate OS Showdown for 2025

September 15, 2025
How to Pick the Ideal Blogging Platform for Your Needs
Solutions & Troubleshooting

How to Pick the Ideal Blogging Platform for Your Needs

April 1, 2025
Protecting Your WordPress Site from File Upload Vulnerabilities
Solutions & Troubleshooting

Protecting Your WordPress Site from File Upload Vulnerabilities

September 26, 2024
Previous Next

You Might Also Like

Optimize WordPress
Solutions & Troubleshooting

Want Faster Load Times? Optimize WordPress This Way

Admin (Nghia Vo) Admin (Nghia Vo) May 16, 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

Admin (Nghia Vo) Admin (Nghia Vo) May 14, 2025
How to Add a Read More to Product Descriptions in WooCommerce
Solutions & Troubleshooting

How to Add a “Read More” and “Show Less” Button to Product Descriptions in WooCommerce

Admin (Nghia Vo) Admin (Nghia Vo) May 5, 2025
Optimized Pagination thumbnail
Solutions & Troubleshooting

How I Optimized Pagination and Skyrocketed Traffic

Admin (Nghia Vo) Admin (Nghia Vo) April 28, 2025
Title and Meta Description Mismatch on Google
Solutions & Troubleshooting

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

Admin (Nghia Vo) Admin (Nghia Vo) September 25, 2024
Contact button
Solutions & Troubleshooting

Contact button in the footer with added call button shake effect

Admin (Nghia Vo) Admin (Nghia Vo) September 21, 2024
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
Welcome Back!

Sign in to your account

Lost your password?