jaynesh — 2011-12-26T08:08:35-05:00 — #1
I've got a few jquery scripts on my website, with a few that take a while to load.
How can I add a message in the corner of the website saying "Loading" when it is processing the page?
system — 2011-12-26T15:47:47-05:00 — #2
You can put all your normal page content in a separate wrapper div in the <body> and the loading notification in a separate "loading" div also in the <body>.
By default, hide the wrapper div in the css and only display the "loading" div. Then in your window.onload event handler, using DOM methods hide or remove the "loading" div and unhide (display) the wrapper div.
jaynesh — 2011-12-27T04:07:17-05:00 — #3
Hello. You have misunderstood me. Let me explain in more detail.
I have a website that displays all my blog posts. On this website I have an infinite scrolling script, where when the user scrolls down it will display more results. It takes around 2 seconds for it process the next set of results therefore I would like it display a spinner or "loading..." at the corner of the page while it is being processed. I would also like to add the "loading..." message to other requests so I'm looking for a global solution.
system — 2011-12-27T04:16:13-05:00 — #4
It appears you are making this up as you go along because the above is all you said in your op and "processing the page" usually means while the page is loading. In any case, your options are linked to some extent to what
It takes around 2 seconds for it process the next set of results
means and exactly how the results are being "processed".