Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Page Pre loader not removing

var loader = $('<div id="loading-container"><div id="loading-inner"><p id="percent">100</p><div id="bar"><div id="bar-percent"></div></div></div></div>')

$('body').append(loader);

$(window).on('load', function(){
  setTimeout(removeLoader, 2750); //wait for page load PLUS x.
});

function removeLoader(){
    //fadeUp.play();
    loader.fadeOut(250, function() {
      // fadeOut complete. Remove the loading div
      loader.remove(); //makes page more lightweight 
    });  
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: socket io check send 
Javascript :: Target one specific Jquery Data Table theader for CSS styles 
Javascript :: Save multiple radios checked on LocalStorage 
Javascript :: Browser globals 
Javascript :: the given sign-in provider is disabled for this firebase project 
Javascript :: splunk : json spath extract 
Javascript :: react open popup to upload image file 
Javascript :: how to hide prerendered page button in nextjs 
Javascript :: style dropdown react native picker 
Javascript :: boilerplate functional component for DataGrid 
Javascript :: FlatList load top 
Javascript :: Creating Variables In Self Evoking Function 
Javascript :: Odoo Javascript Modules 
Javascript :: "Uncaught (in promise) TypeError: dispatch is not a function" 
Javascript :: JSON Using Its Own Property To Get Promise Value 
Javascript :: 120. Triangle - JavaScript Solution With Explanation 
Javascript :: ngrx angular Cannot add property 0, object is not extensible 
Javascript :: javascript quotes 
Javascript :: cannot setState in event handler 
Javascript :: cookie in Auth header 
Javascript :: Nodejs change host on npm run dev 
Javascript :: Update A Value In ExpressJS/MongoDB 
Javascript :: prisma get single data query 
Javascript :: vue append component to div 
Javascript :: recursive function and json object 
Javascript :: country select dropdown javascript 
Javascript :: react custum toogle 
Javascript :: javascript asynchronous function list 
Javascript :: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 
Javascript :: javascript find vs filter 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =