Skip to content

Instantly share code, notes, and snippets.

@KZeni
Created October 7, 2013 19:00
Show Gist options
  • Save KZeni/6873106 to your computer and use it in GitHub Desktop.
Save KZeni/6873106 to your computer and use it in GitHub Desktop.
Prevent Twitter Typeahead drop down overlap due to IE7 z-index behavior (position:relative on container causes typeahead inputs after it to be a higher z-index by default [causing the drop down to be shown under it], but this makes it so each typeahead container decreases in z-index as it's later in the page).
var zIndexNumber = $('.twitter-typeahead').length+1;
$('.twitter-typeahead').each(function() {
$(this).css('z-index',zIndexNumber);
zIndexNumber -= 1;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment