$(".item").each(function(){
var item_link = $(this).find("a").attr("href");
$(this).prepend('<div class="img_url"></div>');
var img_url = $('div.img_url', this);
$.get(item_link, function(data) {
var src = $('.poster img', data).attr('src');
img_url.html(src);
});
});
Each .get should be started after the previous is finished. Now all the .get start in one time.
Any idea?
NOTE: The plugin quoted here was updated for jQuery 1.5+, follow the link to the original question to get the newest version.
You could use this
$.ajaxQueue()originally posted on my answer to Sequencing Ajax RequestsApplied to your source