I am retrieving results from twitter using jQuery using the following code:
$(document).ready(function(){
var url='http://search.twitter.com/search.json?callback=?&q=';
var query="test";
$.getJSON(url+query,function(json){
$.each(json.results,function(i,tweet){
$("#results").append('<p><img src="'+tweet.profile_image_url+'" widt="30" height="30" />'+tweet.text+'</p>');
});
});
});
}
But I want to retrieve new data every 5 seconds and append it to the div? How can I do that?
demo