JavaScript Loading Screen while page loads

You can wait until the body is ready:  Run code snippetExpand snippet Here is a JSFiddle that demonstrates this technique. Update Here is a modern version using promises. The promise is completely optional now, as it is only used for a delay. The DOMContentLoaded event will fire once the page is loaded.

jQuery: How can I create a simple overlay?

An overlay is, simply put, a div that stays fixed on the screen (no matter if you scroll) and has some sort of opacity. This will be your CSS for cross browser opacity of 0.5: This will be your jQuery code (no UI needed). You’re just going to create a new element with the ID #overlay. Creating and destroying the …

Read more

wait() or sleep() function in jquery?

setTimeout will execute some code after a delay of some period of time (measured in milliseconds). However, an important note: because of the nature of javascript, the rest of the code continues to run after the timer is setup:

Installing jQuery?

Get jQuery up and running in a minute or less: Insert this into your HTML (most commonly in the head, but you can throw it before the end body tag too): Then place a script element after your jQuery one. This would alert ‘hello’ after the DOM is ready. Read the documentation. Using jQuery locally: After …

Read more

How to use jQuery qTip?

I believe the problem stems from incompatibility between the new qTip versions and jQuery. I’ve spent the last hour testing code with qTip to try and find out why my code refused to work and after looking through the forums to see if I could find similar problems I’ve noticed that the following code within the thread …

Read more