Is it possible to put multiple IF statements in Javascript? If so, I'm having a fair amount of trouble with the statement below. I was wondering if you can put another IF statement in between if (data == 'valid') AND else? I want to add another if data =='concept') between the two.
if (data == 'valid') {
$("#file").slideUp(function () {
$("#file").before('<div class="approvedMessage">WIN WIN WIN!</div>');
setTimeout(ApprovedProof, 5000);
});
function ApprovedProof() {
$("#file").slideDown();
$('.approvedMessage').fadeOut();
}
}
else {
$("#file").slideUp(function () {
$("#file").before('<div class="deniedMessage">NO NO NO!</div>');
setTimeout(DeniedProof, 5000);
});
function DeniedProof() {
$("#file").slideDown();
$('.deniedMessage').fadeOut();
}
}