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 today’s fast-paced and highly competitive marketing environment, even the most creative campaign is only…
We are NYC moving firm. Are you planning a flat move? Maybe a distance or…
Mobile devices, unlike desktops and laptops, can not be handled by dozens or hundreds of…
Augmented Reality- An immersive experience for the learners! Learning and education aren’t the same as…
On special days like birthdays and weddings, we all like to celebrate our loved ones…
A web application is different from a regular mobile or desktop application as it runs…