So I'm using jquery to POST some items and save into the database. I have two optional fields, if they're not empty, I'd like to fadeIn in a related div in the success function. You'll notice the #picCheck.fadeIn. Right now that fades in if the stuff is submitted, but like i said, I'd like for it fadeIn only if the variable "picvault" from the submitted form has is set.
Here's the jquery:
$.ajax({
type: "POST",
url: "edit.php",
data: $form.serialize(),
success: function(){
$('form#editForm').hide();
$('div.success').center();
$('div.success').fadeIn('slow').animate({opacity: 1.0}, 2000).fadeOut(1000);
$('#picCheck'+sid).fadeIn('slow');
}
}); // End .ajax fucntion