I have a form where on submit i want to show a success msg ,and once it appear i want to fadeout.I am using this code,but not working,I am using live because on load that div is not present,on successful submission of form I am loading that div,hope so my words are clear,any help ll be great.
$(".formsucessmsg").live(function () {
$(".formsucessmsg").fadeOut("slow");
});
You should really be delaying the fade to give folks time to read the message.
But the main thing you need to do is add an event that it binds to, in this case using “load” will make it work properly.
But that is a direct answer to your question. You could also be adding this to your “success” callback assuming you are using $.ajax() or $.post() to handle the whole thing at the time you create and load
.formsuccessmsg