Efficient way of hiding elements with certain classes $.each, for, etc
<p>I have an array populated with classes. I need to loop across this array and hide any elements with that particular class.</p>

<pre><code>// Array of classes
// hide.length ~ 100
</code></pre>

<p>This is my current implemntation:</p>

<pre><code>// Hide all elements with these class names
$.each(hide, function(key, filter_class){
  $('li.'+filter_class, '.result_row_items').hide();
});
</code></pre>

<p>I believe this would be a more efficient (performance wise) way:</p>

<pre><code>for(i=0;i&lt;hide.length;i++){
  $('li.'+hide[i], '.result_row_items').hide();
}
</code></pre>

<p>Would this be even better?</p>

<pre><code>// Create string of class names
var classes = '';
for(i=0;i&lt;hide.length;i++){
  classes += 'li.'+ hide[i] + ', '
}
// Remove trailing comma and space
classes = classes.substring(0, classes.length - 2);
$(classes, '.result_row_items').hide();
</code></pre>
