I have now a solution for an .each-callback!
I had to do an ajax-request for each element in an array. So I made a div-container with all the div-elements for each element. Each time a load was made, the div-element changed to green and .slideUp, after .remove.
And each time i asked if the div-container is empty. If yes, I know, all elements are fully loades (because removed).
Here a part of my code:
<script>
$(document).ready( function() {
$.each(myChannels, function(index, value) {
$("#tag_"+value).load('getxmls/ajaxrenewchannel/channel:'+value, function() {
$("#tag_"+value).removeClass('alert-info').addClass('alert-success');
$("#tag_"+value).slideUp('600', function () {
$("#tag_"+value).remove();
if( $('#loadcontainer').is(':empty') ) {
window.location = 'feeds/';
}
});
});
});
});
</script>
Hope this helps somebody out there...