So this code gets the latest ten dog photos from Flickr using jquery and json. But, how do I get it auto updating when a new photo is available (like twitter search). What are the steps involved?
Kinda simple, all you have to do is wrap the ajax call in a function and name it and call a setInterval() call like the following
every 3 seconds
Second way to do it though more dirty is to wrap the entire code in the setInterval() like so
Either way the function has 2 parameters setInterval(function, time)
note that the time is set in ms (3000 = 3 seconds, 500 = 1/2 a second, ect)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".