Reputation: 409
here is the code : http://jsfiddle.net/yuliantoadi/hMr7h/
if you try to hover the 'test 2' link, the dropdown menu will appear. the problem in IE 6, any idea how to make this dropdown menu work in IE 6?
Upvotes: 2
Views: 1988
Reputation: 141638
In IE 6, :hover
only works on a
tags for CSS. If you want hover effects for IE 6, they'll have to be done in Javascript.
Upvotes: 3
Reputation: 27436
That's because IE 6 (and 7, if my memory serves) doesn't support the :hover
pseudo-class on anything but a link.
You can, however, emulate the behavior with a bit of JavaScript (not using jQuery, unlike choise's answer):
var element = document.getElementById('someid'); // I'm leaving this part up to you.
element.onmouseover = function (e) {
element.className += ' hover';
};
element.onmouseout = function (e) {
elemen.className.replace(' hover','');
};
Upvotes: 0
Reputation: 25244
you could use some JS to work around.
jquery sample:
$(function(){
$('.link ul li').hover(
function(){
$(this).addClass('hover');
},function(){
$(this).removeClass('hover');
});
});
Upvotes: 1