Advertisement
Guest User

Untitled

a guest
Aug 13th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (sum<47){//ignore small error
  2.         //if time sum is less than 47,since we want a 50ms-per animation  
  3.  
  4.                     // we wait to count the sum to more than the number
  5.             console.log("still wating: ",sum)
  6.         }
  7.         else{  
  8.                     //here the sum is bigger what we want,so make the UI change
  9.             console.log("------------runing: ",sum)
  10.                 sum=0 //reset the sum to caculate the next diff
  11.                 if(cur < 100)
  12.                 {
  13.  
  14.                     p.style.width=++cur+"px"
  15.  
  16.                 }
  17.                 else{
  18.  
  19.                     clearInterval(temp)
  20.  
  21.                 }
  22.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement