How to write a generic routine to enable disable control nested in page by jquery
<p>i know how to enable or disable control using jquery one-by-one
suppose if i need to enable/disable hyperlink then i can write code like</p>

<pre><code>a.disabled { color:gray; }
$(document).ready(function() {
$('a.something').click(function(e) {
    e.addClass('disabled');
    e.preventDefault();
});
});
</code></pre>

<p>suppose if i need to enable/disable textboxes then i can write like</p>

<pre><code> $("#textbox1").attr("disabled", "disabled"); 
 $("#textbox1").removeAttr("disabled"); 
</code></pre>

<p>suppose i need to enable or disable many controls in my page like
5 textboxes one button and few hyperlink inside a div.</p>

<p>i want to write a jquery function where i will pass a block like
here i will explain my control position or hierarchy </p>

<pre><code>{
  textbox1,
  textbox2,
  textbox3,
  Button1,
  #dv1.div&gt;ul&gt;li&gt;&lt;/a&gt;
}
</code></pre>

<p>so i want to pass the above block to a function and that function will enable / disable control in pages. if anything similar like possible then please discuss here. thanks</p>
