How would I incrementally decrease the z-index on a set of div elements using jQuery starting with an index of 999.
I have already seen other questions about incrementally decreasing z-index but it doesn't have a starting z-index for the first element. Modified code from that post is below:
$('div.count').each(function(i){
$(this).css('z-index', $(this).length-i);
});
End result should look like:
<div class="count" style="z-index:999;"></div>
<div class="count" style="z-index:998;"></div>
<div class="count" style="z-index:997;"></div>