1
Answer

jQuery number counter animation

Asyraf MN

Asyraf MN

6y
2.9k
1
I'm using this jQuery snippet to animate a data from notepad like number counter way.I just want it to display it randomly. Could someone show me how to modify it to get letters and numbers because the codde are only read numbers.
 
 Asp.Net
  1. <b><asp:Label ID="Label1" runat="server" Text="" Font-Names="Krona One" Font-Size="70"  
  2. ForeColor="#ffff00" class="Count"></asp:Label></b>  
 JQuery
 
  1. <script type="text/javascript">  
  2.         $('.Count').each(function () {  
  3.             $(this).prop('Counter', 0).animate({  
  4.                 Counter: $(this).text()  
  5.             }, {  
  6.                     duration: 2000,  
  7.                     easing: 'swing',  
  8.                     step: function (now) {  
  9.                         $(this).text(Math.ceil(now));  
  10.                     }  
  11.                 });  
  12.         });  
  13. </script>  
Answers (1)