Using jQuery prop() method you can enable or disable a form element. From jQuery 1.6+ you can use jQuery prop() method.
You can enable or disable an elements on a page dynamically with jQuery by setting their attributes accordingly.
For jQuery 1.5 and below the .prop() function doesn’t exist, but .attr() method does similar thing.
$( "#elementID" ).prop( "disabled", true );
$( "#elementID" ).prop( "disabled", false );
Also Read:
$("input").attr('disabled','disabled');
$("input").removeAttr('disabled');
This will totally remove the disabled attribute from the element instead of blanking it out.
Read jQuery reference for more details.
In a world where digital presence is paramount, the question isn't whether you should do…
Over the years, people have experimented with various methods to maintain healthy and beautiful hair.…
Your brand more than developing an attractive and creative logo and infectious motto. It's the…
Introduction Are you someone who has suffered from a personal injury and want to file…
Operating from home has emerged as one of the most popular ways of doing jobs…
If the consequences of our society’s ever-growing debt are what worries you, then it is…