Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save quandyfactory/417792 to your computer and use it in GitHub Desktop.
Save quandyfactory/417792 to your computer and use it in GitHub Desktop.
Silly jquery hack for IE6.
/*
Stupid, stupid way of enabling second-tier popout menus on IE6 but what the hell.
Yes, this can be done with about 3 lines of CSS in a browser that's not "special".
All I can say is, THANK YOU jQuery!
*/
if ($.browser.msie == true && $.browser.version == 6) {
$('ul#menu li').mouseover( function() {
var html = $(this).html();
if (html.indexOf('<div>') > -1 || html.indexOf('<DIV>') > -1) {
var $child = $(this).find('ul');
var position = $(this).offset();
$child.css('position', 'absolute').css('left', position.left+180+'px').css('top', position.top+'px').css('display', 'block');
}
})
$('ul#menu li').mouseout( function() {
var html = $(this).html();
if (html.indexOf('<div>') > -1 || html.indexOf('<DIV>') > -1) {
var $child = $(this).find('ul');
$child.css('display', 'none');
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment