the read only property is not able to disable using jquery -


this question has answer here:

in jquery

according condition make 1 field read below code

$("#name").attr("readonly", true); 

it working fine

but when try disable using below codes

$("#name").attr("readonly", false);            or $("#name").attr("disabled", false); 

it not getting disabled. how can achieve it

the value of disabled attribute not matter. if in attribute list, element disabled regardless of whether false or true or empty. need remove attribute enable back.

use $("#name").removeattr('disabled') re-enable element.


Comments

Popular posts from this blog

What Are The Best Universities In The World?

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World