Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $.ajaxSetup({
  2.     async: false
  3. });
  4.  
  5. function myFunction( _percent )
  6. {
  7.  
  8.     var $ppc = $( '.progress-pie-chart' );
  9.     deg = 360 * _percent / 100;
  10.  
  11.     if ( _percent > 50 )
  12.     {
  13.         $ppc.addClass( 'gt-50' );
  14.     }
  15.  
  16.     $( '.ppc-progress-fill' ).css( 'transform', 'rotate('+ deg +'deg)' );
  17.     $( '.ppc-percents span' ).html( _percent + '%' );
  18.  
  19.     if ( _percent < 100 )
  20.     {
  21.      $.get("cp.php", function(data){
  22.         _percent=(data);
  23. });
  24.  
  25.         setTimeout( function()
  26.         {
  27.             myFunction( _percent++ );
  28.         }, 3000 );
  29.     }
  30.     else
  31.     {
  32.         return _percent;
  33.     }
  34. }
  35. var _percent = 0 ;
  36. for (i = 0; i < 100; i++) {
  37.     myFunction(_percent);
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement