What is wrong with my code?
After clicking the button, I want to hide and show a div with another result.
This is happening, but is not running the submit code. The field value is not getting propagated.
$(document).ready(function(){ $('#conteudo').hide(); $('#button').click(function(event){ $('form#form1').submit(function(event){ $("#form").hide("slow"); $("#conteudo").show("slow"); event.preventDefault(); }); }); $('#mostrar').click(function(event){ event.preventDefault(); $("#form").show("show"); $("#conteudo").hide("show"); }); });