How to create statistic counter when scroll the page using Jquery and css

In this section will tell you how to create statistic counter while scroll the webpage. This section normally available for all types of websites. This is one of the animated counter section will easily explain the customers about our status. This pictorial representation is very attractive the customers. The counter animation will done by using javascript, Jquery and css. The fonts are font awesome icons.

For layout i am using the bootstrap here. This is one of the simple example shows how easy to create this types of animated circle counter using Jquery. You can customize this layout using the below simple css code. This types of sections are available most of the website to present the best information attractive animated manner.

This statistic counter is one of the simple animated counter. This counter will execute while scroll the website or view the particular animated section. This counter having the certain numeric value, the counter starts from number 0 and increase up to the specified value. You will specify the numeric value in the particular class called currency-count like this:

<span class="currency-count">530</span>

I hope this common below example is useful to you. Here i provided the demo link and full code to download. Checkout those pages. 







Styles for Stat counter while scroll:

<style>
html,
body {
  height: 100%;
  font-family: 'Open Sans', sans-serif;
}

.pb100 {
    padding-bottom: 100px;
}

.pt100 {
    padding-top: 100px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', sans-serif;
    padding: 0;
    margin: 0;
}


.counter-section {
  background: url(bg.jpg);
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  background-size: cover;
}

.counter-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.89);
}

.count-items {
  text-align: center;
  padding: 50px 20px;
  border-radius: 100%;
  border-bottom: 3px dotted #666;
  border-top: 3px dotted #666;
}
.count-items:hover.count-items i{
  color: #ffaf53
}
.count-items:hover.count-items h2{
  color: #f35b68
}
.count-items i {
  color: #f35b68;
  font-size: 36px;
}

.count-items span {
  color: #fff;
  font-size: 36px;
  padding: 20px 0px;
  display: inherit;
  font-weight: 700;
}

.count-items h2 {
  font-size: 16px;
  color: #ffaf53;
}
.funfact {
  margin-top: 50px;
  text-align: right;
}

.funfact h2 {
    color: #ffaf53;
    font-size: 42px;
    font-weight: 700;
    position: relative;

}
.funfact h2:after {
position: absolute;
content: "";
width: 115px;
height: 2px;
background:#fff;
right: 0px;
bottom: -24px;


}
.funfact p {
  line-height: 24px;
  font-size: 16px;
  margin-top: 50px;
  color: #e1e1e1;
}
a.site-btn.transition-ease.quote-btn {
  padding:14px 28px;
  background: #f35b68;
}
.site-btn.header-quote-btn:hover {

    background: transparent;
    color: #252525;

}
.site-btn.header-quote-btn {
padding:14px 28px;
background: #f35b68;
  background: linear-gradient(to right, #f35b68, #ffaf53);
  margin-left: 20px;
text-transform: capitalize;
background-origin: border-box ;
}
#marquee-container {
  padding: 20px 0px;
}

.fix {
    overflow: hidden;
}
</style>



Html Code for Statistic Counter for website:


<section class="counter-section fix">
<div class="counter-overlay"></div>
<div class="container pt100 pb100">
<div class="row">

<div class="col-md-3 col-sm-6">
<div class="currency-counter count-items">
<i class="fa fa-rocket"></i>
<span class="currency-count">1224</span>
<h2>Designs Completed</h2>
</div>
</div>

<div class="col-md-3 col-sm-6">
<div class="currency-counter count-items">
<i class="fa fa-users"></i>
<span class="currency-count">30</span>
<h2>Team Member</h2>
</div>
</div>

<div class="col-md-3 col-sm-6">
<div class="currency-counter count-items">
<i class="fa fa-calendar"></i>
<span class="currency-count">15</span>
<h2>Years Experience</h2>
</div>
</div>

<div class="col-md-3 col-sm-6">
<div class="currency-counter count-items">
<i class="fa fa-comment-o"></i>
<span class="currency-count">530</span>
<h2>Satisfied Customers</h2>
</div>
</div>
</div>

</div>
</section>
<h2 style="padding:40px; text-align:center;"><a href="http://www.sanwebcorner.com/">www.sanwebcorner.com</a></h2>
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/jquery.counterup.min.js"></script>
<script src="js/waypoints.min.js"></script>
<script src="js/main.js"></script>

Post a Comment

0 Comments