How to disable/enable an element with jQuery

Sometimes you need to disable or enable some elements in your document and jQuery makes this task easy. All you have to do is to set disabled attribute to "disabled". Example: // To disable
$('.someElement').attr('disabled', 'disabled');

In order to enable any disabled element you need to set the disabled attribute to empty string or remove it entirely like in the code below.

// To enable

Comments

Popular posts from this blog

Types and forms of imitation gemstone and manufactured

Genuine Windows 7 Ultimate: The GENUINE Windows 7 activator for x32 and x6480

7 Tips before you buy detectors for gold and treasures and minerals