background preloader

Westciv - tools & resources for web professionals

Westciv - tools & resources for web professionals

Display:inline, webdesign et développement web PleaseWait | A Loading Page for your SPA by Pathgather To Use Step 1: Install bower install please-wait npm install please-wait Step 2: Include in your HTML Include the please-wait.css file in your <head> tag/in your normal workflow. You can include the please-wait.js file at the end of your body, but above your other <script> tag(s) if you like. Step 3: Hide initial HTML flash Optional: If your initial template has some styled HTML by default (like a toolbar), you'll probably want to hide that, or your users could see a quick flash of your normal template, followed by the loading screen. Step 4: Show the loading screen As soon as possible in your app, call pleaseWait to trigger the loading screen. backgroundColor - Needs to be a valid CSS color. logo - The URL to a logo to display. Step 5: Close the loading screen Whenever you're app is ready for the user, call finish() on the returned object from the pleaseWait call. Bonus Section!

Related: