how to enable/disable a div tag and all elements inside it when a button is click? javascript only
<pre><code>function toggleDisabled(el) {
try {
el.disabled = el.disabled ? false : true;

}
catch(E){
}
if (el.childNodes &amp;&amp; el.childNodes.length &gt; 0) {
for (var x = 0; x &lt; el.childNodes.length; x++) {
el.style.opacity=0.5;
toggleDisabled(el.childNodes[x]);

}
}
}
</code></pre>

<p>I have been able to disable the button onclick, but I'm having troubled getting the other button to re-enable it..one more thing it is not the button that will enable/disable, but rather it is the div and its elements.</p>

<p>heres the link :<a href="http://jsfiddle.net/XBppR/20/" rel="nofollow">http://jsfiddle.net/XBppR/20/</a></p>

<p>try to click the text, then call, it will both disabled, my problem is i don't want them to be both disabled or both enabled...</p>
