I\'m trying to prevent multiple requests when user click on login or register button. This is my code, but it doesn\'t work. Just the first time works fine, then return fals
I have also faced a similar problem.
Just adding $('#do-login').attr("disabled", true); gives me the solution.
$('#do-login').attr("disabled", true);
$('#do-login').click(function(e) { e.preventDefault(); $('#do-login').attr("disabled", true); ......... .........
Here do-login is button id.
do-login