Hi I am having some trouble combining a js function with a jQuery function. The code below works, but as you might have guessed, I am hoping to fade first, then change the HTML, then fade back in.
function updateit(a) {
$("#monthlyHead").fadeOut(100);
$("#monthlyText").fadeOut(100);
if (a == 1) {
$("#monthlyHead").html(headone);
$("#monthlyText").html(textone);
}
else if (a == 2) {
$("#monthlyHead").html(headtwo);
$("#monthlyText").html(texttwo);
}
$("#monthlyHead").fadeIn(900);
$("#monthlyText").fadeIn(900);
}