Possible Duplicate:
jQuery Ajax wait until all images are loaded
I want to have my images loaded first in my ajax call first before showing. How do I do that?
$.ajax({
url: 'ajax.php',
type: 'post',
data: "q="+query,
success: function(data) {
$('.show').html(data).fadeIn('fast');
}
});
I'd like to have a clean fadeIn of my ajax but right now its showing up right away and my texts are completely loaded but my images are loading slowly and gets loaded from top of page to bottom page.
Ideally i'd like to show a loading symbol and then have a clean fadeIn when my images are loaded in the background.
Thanks!