Just use jQuery hover instead of CSS.
eg. instead of such CSS:
#Div1:hover { background-color: yellow; }
This jQuery has:
$("#Div1").hover(function() { $(this).css("background-color", "yellow"); }, function() { $(this).css("background-color", ""); });
The same effect, and you control the JS code and may have conditions.
Live test case: http://jsfiddle.net/THXuc/
source share