Aurora078 Posted August 11, 2010 Posted August 11, 2010 Ok, so im wondering how can i use an image to show that ajax is loading, for effect of course. Quote
a_bertrand Posted August 11, 2010 Posted August 11, 2010 Well the easiest is to have a div with an image inside, and show it while you start the Ajax call, and hide it when it's done. You could do it without the div, but I would personally still use a div around it. Quote
Aurora078 Posted August 11, 2010 Author Posted August 11, 2010 Well the easiest is to have a div with an image inside, and show it while you start the Ajax call, and hide it when it's done. You could do it without the div, but I would personally still use a div around it. I'm looking for some sort of delay in the request, because my AJAX loads so fast you can only see the image for half a second. Mainly for effect, like a 3000ms delay would be quick and still achieve my effect Quote
Zeggy Posted August 11, 2010 Posted August 11, 2010 Why on earth would you want to make visitors wait an extra 3 seconds just to see an image while they wait? You can use setTimeout to have functions run after a certain time. Quote
Dave Posted August 11, 2010 Posted August 11, 2010 Why on earth would you want to make visitors wait an extra 3 seconds just to see an image while they wait? You can use setTimeout to have functions run after a certain time. As Zeggy said why in hell would I as a user wanna wait 3 seconds just to see a little image? When there would be no point? Quote
Aurora078 Posted August 11, 2010 Author Posted August 11, 2010 I dont know to be honest, but it makes them wonder lol. Quote
Haunted Dawg Posted August 11, 2010 Posted August 11, 2010 Since your using jquery. How come you have not come accross the $.delay() function yet? It's simple. $("#chatFeature").delay(3000).fadeIn(600); $("#imageBar").delay(3000).fadeOut(600); That way, after 3000ms as you wanted, they will both fade(out/in). Quote
Djkanna Posted August 11, 2010 Posted August 11, 2010 Start of Ajax prepend a div overlay to the body tag, End of Ajax request Remove it Simple. Quote
rulerofzu Posted August 14, 2010 Posted August 14, 2010 I know a game that actually uses a delay and shows the loader for 5 secs just to slow down the gameplay. Kinda sucky thing to do and they denied it until I pulled the bit of code. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.