how to remove event.preventDefault()? -
$("#submit").on("click", function() { event.preventdefault(); var $data = $("#form"); $.post($("#form").attr("action"), $data.serializearray(), function(data) { var response = $.parsejson(data); if(response.error == 'yes') // code ok here $("#error").stop().empty().show().html('<div id="resp_message">'+response.message+'</div>').fadeout(5000); else // here wont work $("#form").submit(); }); });
all want display message or submit if query ok please me
you need use jquery.off remove .on binding allow bind on click handler not have preventdefault in there
Comments
Post a Comment