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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top