Posted By

justinseiter on 06/21/09


Tagged

jquery


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

danielfilho
zanetaylor
kanampo
Balamir


Fix IE7 Z-Index Issues with jQuery


 / Published in: jQuery
 

URL: http://www.vancelucas.com/blog/fixing-ie7-z-index-issues-with-jquery/

One way to fix many of the issues with IE7 is to dynamically reverse the default z-index stacking order of the elements on your page. This will ensure the elements higher in your HTML source will also have a higher z-index order on your page, solving most of the IE stacking issues. If you’re using jQuery (the best Javascript library there is), here’s the quick fix:

  1. var zIndexNumber = 1000;
  2. $('div').each(function() {
  3. $(this).css('zIndex', zIndexNumber);
  4. zIndexNumber -= 10;
  5. });

Report this snippet  

You need to login to post a comment.