I have an ul
which contains many links. when using jQuery to load these links, it renders them all at same time. How can i load them one by one, having attempted the following:
js:
$('#publish').click(function() {
$('#get_links li').
each(function() {
$(this).load('test.php',{'post':$(this).text()});
$(this).html("<i class='icon-spin icon-spinner'></i>Loading");
///NEED TOSLEEP UNTILL $.load finish..
}
);
}
);
How can i sleep the .each loop until .load finish ?