jQuery & Enabled/Disabled Controls
<p>I took from somewhere the following <em>script</em> which clears all input controls in the 'mainFrm' form:</p>

<pre><code>$(':text , textarea , #mainFrm').val('');
$('select option:nth-child(1) , #mainFrm').attr('selected', 'selected');
$(':checkbox , :radio , #mainFrm').removeAttr('checked');
</code></pre>

<p>It works really nice, but the problem is that is clears all controls regardless of the fact that some of them may be disabled. I would like to clear only the enabled ones, leaving the disables ones alone. How can I accomplish this? I tried changing the first line to</p>

<pre><code>$(':text , textarea , enabled , #mainFrm').val('');
$(':text:enabled , textarea , #mainFrm').val('');
$(':enabled, text , textarea , #mainFrm').val('');
</code></pre>

<p>but none of them worked. Can anyone please help me out with this?</p>
