javascript - Circle Progress bar animation start only after screen visible -


can 1 me start circle progress bar animation when screen visible.

$('.html').classyloader({     percentage: 95 });  <div class="icon-html">     <canvas class="html"></canvas> </div> 

did mean this? html:

 <div class="overall">    <div class="content">     content    </div>  </div> 

jquery:

 element = $(".content").offset().top;  $(window).scroll(function(){    y = $(window).scrolltop();    $('.result').html(y);     if (y >= element){       $('.content').show();     }else{       $('.content').hide().removeattr('style');     }  }); 

demo

what waits until user scroll 200px of higher (lower on page) , shows div , in case circle


Comments