filmov
tv
Jquery disable button on click to prevent multiple form submission

Показать описание
In this quick post I’ll show you how to disable click event using jquery, as you have faced this issue while submitting your form data using ajax, User may click multiple times if you haven’t disable submit button. So here I’ll show you very quick method to fix this issue. It’ll also help you to prevent duplicate entry in database.
You can simply use jQuery off() method, jQuery off() method is used to remove event handler from the element attached with the on() method. Use off() method after click event is triggered to disable element for the future clicks.