jQuery fadeIn fails with jqQuery form-plugin

Posted by VoodooBurger on Stack Overflow See other posts from Stack Overflow or by VoodooBurger
Published on 2010-03-17T11:47:19Z Indexed on 2010/03/17 11:51 UTC
Read the original article Hit count: 479

Filed under:
|
|
|
|

I have a message that I want to fadeIn when a form is successfully send. I'm using the jQuery form plugin and the code:

$(document).ready(function() {
var options = {
target: '#output',
beforeSubmit: validate,
resetForm: true
}; 
$('#holdform').ajaxForm(options);
});

The validate function works perfectly so i added this code before it returns true:
(...)

$('#output').fadeIn('slow');
return true;    
}

This should fadeIn the div I have underneath the form, styled as display: none;.
But what happens is that the div fades in and then disappears. Does anyone have an explanation and possibly a solution to fix it? Thank you in advance!

The code can be seen in it error-action here: http://gadebold.dk/events/tilmeld/

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about form