KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Doing following in jQuery: $('#signupbox1').on('click', '#signup1', function() { var str = $('#signupform').serialize(); // make it look like a waiting button $('#signup1').addClass("btn_wait"); var btn_val = $('#signup1').val(); $('#signup1').val(''); $.ajax({ type: "POST", url: "signup_step1.php", data: str, success: function(msg) { //doing stuff here $('#signup1').removeClass("btn_wait"); $('#signup1').val(btn_val); } }); }); How could you disable the click event as well till you receive an answer from the ajax call? So, when you click on the button it not only "transforms" to a waiting button because of the added class, but also the click event will be "paused"... is this possible? Thank you very much in advance!
Tags (comma-separated)
Save Edits
Cancel