"Number Counter"
Bootstrap 4.1.1 Snippet by anvictor

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="col-md-12"> <div class="row"> <div class="col-md-4 col-sm-12 d-print-inline-block" id="card-number"> <div class="container"> <p>Crianças ajudadas:</p> <span class="count">853</span> </div> </div> <div class="col-md-4 col-sm-12 d-print-inline-block" id="card-number" style="background-color:#f5a3d7"> <div class="container"> <p>Módulos realizados:</p> <span class="count">853</span> </div> </div> <div class="col-md-4 col-sm-12 d-print-inline-block" id="card-number" style="background-color:#f5a3d7"> <div class="container"> <p>Sorriso ganhos:</p> <span class="count-infinite">1000000000</span> </div> </div> </div> </div>
#card-number { background-color: #2CAFFD; border: 1px solid #FFFFFF; text-align: center; width: 100%; height: 200px; color: #FFFFFF; } .container { padding: 4em; }
$('.count').each(function() { $(this).prop('Counter', 0).animate({ Counter: $(this).text() }, { duration: 8000, easing: 'swing', step: function(now) { $(this).text(Math.ceil(now)); } }); }); $('.count-infinite').each(function() { $(this).prop('Counter', 0).animate({ Counter: $(this).text() }, { duration: 1000000, easing: 'swing', step: function(now) { $(this).text(Math.ceil(now)); } }); });

Related: See More


Questions / Comments: