hide or show large number of elements using jquery or javascript
<p>I have a situation in a web application, where based on certain conditions, I have to hide or show large number of div elements, numbers ranging from say <strong>500</strong> to <strong>98000</strong></p>

<p>.</p>

<p>What I am doing is I am applying a common class on all the div elements and then iterating the whole set of elements to check whether or not they are fitting in the circumstances and hence are shown or hide.</p>

<p>This logic works fine when the numbers are say in the range of <em>500</em> to <em>10000</em>, but above this range, it is taking quiet some good amount of time to display the result.</p>

<p>I am afraid for really large numbers, this logic may result in some browsers getting hanged.</p>

<p>So, what could be a better approach to handle the above mentioned situation, in most of the browsers   </p>
