jQuery Disable Button After Click

jQuery Disable Button After Click

Today, We want to share with you jQuery Disable Button After Click.In this post we will show you how to prevent multiple clicks on submit button in jquery, hear for how to disable submit button after form submission in javascript we will give you demo and example for implement.In this post, we will learn about how to change a button from enable to disable after click with an example.

jQuery Disable Button After Click

There are the Following The simple About jQuery Disable Button After Click Full Information With Example and source code.

As I will cover this Post with live Working example to develop jquery disable button after click for 5 seconds, so the jquery prevent double clicks for this example is following below.

READ :  Laravel Trusting All Proxies & Configuring Trusted Proxies

jQuery – How to disabled submit button after clicked

$('#saveEmployee').attr("disabled", false);	
or
$('#saveEmployee').removeAttr("disabled");

E-junkie: Sell digital downloads online

E-junkie Provides a Copy-paste buy-now, and cart buttons for selling downloads, codes and tangible products on any website, blog, social media, email and messenger!

Also see:

  1. The Top 10+ Best Webinar Software Platforms For 2020-2021
  2. Build Your Future Godaddy Careers And Jobs
  3. Introduction To Web Hosting Services

$("#saveEmployee").attr("disabled", true);

<!DOCTYPE html>
<html lang="en">

<body>
<h1>jQuery - How to disabled submit button after clicked - infinityknow.com</h1>

<form id="productFtm" action="#" method="POST">
    <input type="submit" id="saveEmployee" value="Submit"></input>
</form>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

<input type="button" value="Update Product" id="updateBtn"></input>

<script>
    $(document).ready(function () {

        $("#productFtm").submit(function (e) {

            //stop submitting the html form to see the disabled button effect
            e.preventDefault();

            //jquery disable the submit button
            $("#saveEmployee").attr("disabled", true);

            //jquery simple disable a normal button
            $("#updateBtn").attr("disabled", true);

            return true;

        });
    });
</script>

</body>
</html>

Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about jQuery Disable Button After Click.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

READ :  Angular Dynamic Routing and Templating View