Having a bit of problem debugging my jQuery code...
In order to allow hover effects on block elements (such as div
) in IE, I want to use jQuery to do the trick instead of css. My jQuery code looks something like:
$(document).ready(function()
{
$("div.foo").mouseover(function(){
$("div.foo h3").addClass("hover");
}).mouseout(function(){
$("div.foo h3").removeClass("hover");
});
});
This works as my header switch between h3
and h3.hover
, BUT if I try to:
$(document).ready(function()
{
$("div.bar").mouseover(function(){
$(this).addClass("hover");
}).mouseout(function(){
$(this).removeClass("hover");
});
});
This won't work in all versions of IE. Does it mean IE has trouble detecting multiple classes on 1 element (which is div.bar.hover
)? Thanks in advance.
EDIT:
After examined the code, I realised the problem lies in a conflict with javascript curvycorners-2.0.4
(which is another IE hack) that were also applied to this element.