Link to home
Start Free TrialLog in
Avatar of Brad Bansner
Brad Bansner

asked on

fadeout, load, fadein, how to wait for load before fadein?

In attached code, is it possible to add something to this that will wait for the "load" statement to finish before the fadeIn? Thank you.
$('#panelleft').fadeOut(500);
$('#panelleft').load('https://www.domain.com/script.asp);
$('#panelleft').fadeIn(1500);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Brad Bansner
Brad Bansner

ASKER

Cool, I think that does it. Just adding a comma and then the next command, forces it to wait?
Hi,

the method invokes jQuery.ajax() to fetch stuff from the server. You can pass it an callback for the complete-event as optional argument.

see this for further information:
http://api.jquery.com/load/