Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- map.progress_bar = // the progress div that grows inside a container div that is the width of the screen (100%);
- progress = 0;
- state.window_width = // the width of the window or otherwise $(window).width();
- setTimeout(function incProgress(){
- if ( map.progress_bar.width() < state.window_width ) {
- progress += 10;
- map.progress_bar.css({
- width: String(progress + '%')
- });
- console.log('progress: ', map.progress_bar.width());
- console.log('window: ', state.window_width);
- setTimeout(incProgress(), 300);
- }
- }, 300);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement