i am downloading images in each iteration. so logic & code is there in each iterator which download image one by one. i want that when all images download gets completed then immediately i want to call a function which notify user that all images download complete.
please guide me to modify my existing code.
here is my code
$(document).ready(function () {
$("table[id*=dgImages] img").each(function () {
if($(this).offset().top > $(window).scrollTop() && $(this).offset().top < $(window).scrollTop() + $(window).height()) {
$(this).attr("src", $(this).attr("original"));
$(this).removeAttr("original");
}
});
});
jQuery deferred objects to the rescue: