Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jul 17th, 2018 45 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. <div class="progress">
  2.   <div class="progress-bar progress-bar-striped" role="progressbar" style="width: 0" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>  
  3. </div>
  4.    
  5. $(".progress-bar").each(function () {
  6.   $(this).animate( {width: $(this).attr('aria-valuenow') + '%' }, 2000 );
  7. });
  8.    
  9. $(window).scroll( function(){
  10.  
  11.   $(".progress-bar").each(function () {
  12.     var bottom_of_object = $(this).position().top + $(this).outerHeight();
  13.     var bottom_of_window = $(window).scrollTop() + $(window).height();
  14.         if( bottom_of_window > bottom_of_object ){
  15.             $(this).animate( {width: $(this).attr('aria-valuenow') + '%' }, 2000 );
  16.         }
  17.     });
  18. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top