jQuery Disable enable Selector Examples

Today, We want to share with you jQuery Disable enable Selector Examples.In this post we will show you Disable or enable an input field with jQuery, hear for How to disable/enable an element with jQuery we will give you demo and example for implement.In this post, we will learn about Disable or Enable Submit Button using jQuery .prop() Method with an example.

jQuery Disable enable Selector Examples

There are the Following The simple About jQuery Disable enable Selector Examples Full Information With Example and source code.

As I will cover this Post with live Working example to develop jquery change class, jquery disable input, so the jQuery enable/disabled Selector for this example is following below.

HTML DOM Input Text disabled/enable Property

To simple jQuery change the disabled elements property We should use the simple jQuery .prop() function.

(jQuery 1.6+)Disable/enable an input with jQuery?

$("input").prop('disabled', true);
$("input").prop('disabled', false);

The jQuery .prop() function doesn’t any exist, but here similar .attr() jQuery function: Set the disabled attribute.

jQuery 1.5 and below

//disable
$("input").attr('disabled','disabled');

//enable
$("input").removeAttr('disabled');

In any version of jQuery

jQuery assuming an event similar handler function of ‘this’

this.disabled = true;

Example: jquery disable/enable input

The prop() jQuery method need to version of the jQuery 1.6 and above for jQuery Disable/enable an element Examples.

    
    
    
    Disable or Enable an Input field using jQuery Examples - Pakainfo.com
    
    
    
    
    
	

Disable or enable an input field with jQuery

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

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

I hope you get an idea about jQuery Disable enable Selector Examples.
I would like to have feedback on my Pakainfo.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.

Leave a Comment