I'm currently trying setting up a little site that pulls in sets from flickr using JavaScript and JSON. It is all working fine except that the order of the photos on the site differs from that of the set on Flickr. I've searched this extensively for a solution, but have had no luck. Has anyone had this issue before? and/or know of a solution? My current code is:
function getImages(setID) {
$.getJSON("http://api.flickr.com/services/feeds/photoset.gne?set=" + setID + "&nsid=USER_ID&lang=en-us&format=json&jsoncallback=?", displayImages);
}
function displayImages(data) {
var htmlString = "";
$.each(data.items, function(i,item){
// get large images
var nextImage = (item.media.m).replace("_m.jpg", "_b.jpg");
htmlString += '<img title="' + item.title + '" src="' + nextImage;
htmlString += '" alt="'; htmlString += item.title + '" />';
});
$('#images').html(htmlString);
}