Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajaxSetup({
- async: false
- });
- function myFunction( _percent )
- {
- var $ppc = $( '.progress-pie-chart' );
- deg = 360 * _percent / 100;
- if ( _percent > 50 )
- {
- $ppc.addClass( 'gt-50' );
- }
- $( '.ppc-progress-fill' ).css( 'transform', 'rotate('+ deg +'deg)' );
- $( '.ppc-percents span' ).html( _percent + '%' );
- if ( _percent < 100 )
- {
- $.get("cp.php", function(data){
- _percent=(data);
- });
- setTimeout( function()
- {
- myFunction( _percent++ );
- }, 3000 );
- }
- else
- {
- return _percent;
- }
- }
- var _percent = 0 ;
- for (i = 0; i < 100; i++) {
- myFunction(_percent);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement