Fixing ie7 z-index stacking issue with jquery
For some reason, Internet Explorer 7 does some pretty hair pulling dance for developers in fixing several obscure bugs. The z-index stacking orders is one of them. One way to fix this is to dynamically reverse the default z-index stacking order of the elements. This will ensure the elements higher in HTML source will have a higher z-index order on page, solving most of the IE stacking issues. Here is the jquery code:
$(function() {
var zIndexNumber = 1000;
$('div').each(function() {
$(this).css('zIndex', zIndexNumber);
zIndexNumber -= 10;
});
});