how to add preloader in html page

$(window).on('load', function() { // makes sure the whole site is loaded 
  $('#status').fadeOut(); // will first fade out the loading animation 
  $('#preloader').delay(350).fadeOut('slow'); // will fade out the white DIV that covers the website. 
  $('body').delay(350).css({'overflow':'visible'});
})

3.67
3
Krish 100200 points

                                    <head>
  <meta charset="utf-8">
  <title>JS and CSS preload example</title>

  <link rel="preload" href="style.css" as="style">
  <link rel="preload" href="main.js" as="script">

  <link rel="stylesheet" href="style.css">
</head>

<body>
  <h1>bouncing balls</h1>
  <canvas></canvas>

  <script src="main.js" defer></script>
</body>

3.67 (3 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
how to preload file html preload tags preloading html how to apply html page as preloader preload html attribute preload things html how to make a preloader in html how to apply preloading page in html link preload html add preloader to the page html css what is preloader in html how to use preloader in html htm preload how to add preloader to html page how to add preloader to website w3schools preload html tutorial how to add pre loader in html page should i preload html add preloader to html page preload in html add preloader for image in html html preload tag add preloader in html 2021 add preloader in html should u use preload html what is preload in html how to apply preloader in html html preload attribute html preload atr preloader html tag preloader for html page html script preload preloaders html preload w3 How to add a preloader in your website. preload script html what is a preloader html how to add preload in html page preloading in html how to add preloader tag preload tag html preloader how to add preloader to a website add preloader in website html preloader w3school html5 preload preloader html html preload page html preload script preloader for html how to set preloader in website how to create a preloader in html html preload pages html preload preloader in html add preloader to website preloader for website html how to set preloader to my html how to add preloader for one page website how to insert preloader in html preloader while page loads how to add preloader in html preload html how to add preloader to website how to add preloader in html page
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source