Help will be most appreciated.
This is the code from the Jquery website
<button id="refresh">refresh</button>
<div id="images"></div>
$("#refresh").click(function(){
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?",
{
tags: "vw beetle",
tagmode: "any",
format: "json"
},
function(data) {
$.each(data.items, function(i, item) {
$("<img/>").attr("src", item.media.m).empty().appendTo("#images");
if (i == 3)
return false;
});
});
});
This is racking my brain, I want to replace the results, not keep adding or appending to the results when the refresh button is clicked.
Thank you
I think you want to empty
#images: