you can use the load() callback function like this:
$("#myDiv").fadeOut().load("www.someurl.com", function(response, status, xhr) {
$(this).fadeIn();
});
you might want to use the status of the load() call to see if everything was completed properly.
$("#myDiv").fadeOut().load("www.someurl.com", function(response, status, xhr) {
if (status == "error") {
// handle error
}
else
{
$(this).fadeIn();
}
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…