Reputation: 11
Okay so I have some code
$.get('results1.html', function(data) {
$('#search-results').html(data);
}).complete(function() {
BlockStuffNow();
});
BlockStuffNow(); is a function that operates on the images that have been loaded into #search-results, BUT it can only operate on them after they all have been loaded, how can I check to see if they have been loaded?
Upvotes: 0
Views: 75
Reputation: 605
You could use a simple load, then run the callback function...
$("#search-results").load("results1.html",function(){
$('img').load(function(){
BlockStuffNow();
})
});
Upvotes: 1