Skip to content

Instantly share code, notes, and snippets.

@adardesign
Created June 29, 2010 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adardesign/457396 to your computer and use it in GitHub Desktop.
Save adardesign/457396 to your computer and use it in GitHub Desktop.
Fix IE7 z-index bug fix, depencies:jquery
$(function() {
var zIndexNumber = 1000;
if ($.browser.msie && $.browser.version < 8){
$('div').each(function() {
if($(this).css("position") =="relative" || $(this).css("position") =="absolute" ){
$(this).css('zIndex', zIndexNumber);
zIndexNumber -= 10;
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment