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

http://api.jquery.com/off/


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -