fadeOut - fadeIn question
I have a situation where I'm pulling text from an array. What I want to do with a button click is to replace the current text, having the current text fade out, then loading the new text and fade in. I've tried a number of different approaches, but what appears to happen is the new text loads, fades out and then fades in. I tried to do this in two ways as shown, first with one line of code then with two, trying to separate commands. If someone could point me in the right direction I would appreciate it.
- $("div#submissions").fadeOut("slow").html(SubmissionArray[CurrentIndex][2].fadeIn("slow");
- $("div#submissions").fadeOut("slow") // fade out current line of text
- $(div#submissions").html(SubmissionArray[CurrentIndex][2].fadeIn("slow"); // fadeIn new text