Question

In my new website, there are number of ajax calls.Now the content is displaying when it's ready. I want to add a pre-loader until everything in the div gets loaded completely. I've used load() function but its not working properly.

Était-ce utile?

La solution

Use the jQuery ready event:

While JavaScript provides the load event for executing code when a page is rendered, this event does not get triggered until all assets such as images have been completely received.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top