correct syntax to show multiple messages followed by fade out
I'm trying find the correct syntax that will allow me to post multiple messages to a text box, with each one showing and then fading out. The current syntax I have is:
if ($('#txtSuccess').val() == "Y") {
if ($('#cbKeep').is(':checked')) {
$('#lblErrMsg').delay(1000).fadeOut(2500).val("You May Add Another Hose Value.").delay(1000).fadeOut(2500);
}
else {
$('#lblErrMsg').delay(1000).fadeOut(2500);
}
}
This code works fine and shows the first message. ( lblErrMsg in this case has already been valued before the jquery executes). What I want to do was to add a second message once the first message fades out and then show that message and fade it out. I thought I could chain the second message by first adding a new value to the lblErrMsg and then repeating the delay and feed out, but it's not working. Could use some help on this one.
Thanks,
Tom