I have written the following code to fadeout a DIV, then load a new DIV and then fadein the same DIV with the new content:
$('div#contentwrapper').fadeout('slow',
function() {
$('div#contentwrapper').load('scripts/php/home.php',
function() {
$('div#contentwrapper').fadein('slow');
});
});
However it never fades out/in the page.
I know the .load() is working as I’ve tested it on its own.
Can anyone see any mistakes in this code?
thx
Try
fadeInandfadeOut. Notice the caps.Here’s a demo with caps: http://jsfiddle.net/vVwF8/
Here’s the error I get when I don’t use caps: