Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. map.progress_bar = // the progress div that grows inside a container div that is the width of the screen (100%);
  2.  
  3. progress = 0;
  4.  
  5. state.window_width = // the width of the window or otherwise $(window).width();
  6.  
  7. setTimeout(function incProgress(){
  8. if ( map.progress_bar.width() < state.window_width ) {
  9. progress += 10;
  10. map.progress_bar.css({
  11. width: String(progress + '%')
  12. });
  13. console.log('progress: ', map.progress_bar.width());
  14. console.log('window: ', state.window_width);
  15. setTimeout(incProgress(), 300);
  16. }
  17. }, 300);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement