alternate row in classes exculde display none in jquery
<p>I have a list of <code>li</code> in a <code>ul</code> to apply css class, I am using following code.</p>

<pre><code>$('#' + firstContainer + ' li:nth-child(even)').addClass('AltRow');
$('#' + firstContainer + ' li:nth-child(odd)').removeClass('AltRow');
$('#' + secondContainer + ' li:nth-child(even)').addClass('AltRow');
$('#' + secondContainer + ' li:nth-child(odd)').removeClass('AltRow');
</code></pre>

<p>Now there are some <code>li</code> which are set to display none so I need to exculde those while applying class.</p>

<p>How to achieve that.</p>
