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

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -