title: jQuery function optimization
body: <p>Is there a way to make this faster? </p>
  
  <p>This function manages some dynamic form elements. </p>
  
  <pre><code> function HideAllDivs(parentDiv) {
          var divs = $('#' + parentDiv + ' div'), divsLength = divs.length;   
          for (var a = 0; a &lt; divsLength; a++) {
              var obj = $('#' + divs[a].id);
              obj.find('input[type=radio]:checked').removeProp('checked');
              obj.find('input[type=checkbox]:checked').removeProp('checked');
              obj.find('input[type=text]').val('');
              obj.find('select').val('');
              obj.find('input[type=radio]').each(function () { $(this).removeClass('selectedCtrl');   });
              obj.hide(1);                           
          }    
      }
  </code></pre>
  
  <p>Thanks,
  David</p>