IE6 Hover Bug Fix for Drupal 6
o.k. it's not just for Drupal 6, but it makes the title sound so much better :)
The joys of Drupal are no stranger to the limitations of IE6. I have spent a lot time time playing with themes... it's really been a joy, and part of that has been experimenting with jQuery. In this situation, it was a true lifesaver. While working on a site with some cool hover classes in the primary menu I came across a long standing issue, of course, related it IE6 and earlier... trying to establish a hover state for a li (line) item. The poor browser just won't give us a hover state, so we have to force it to give us an active state.
After looking through a dozen or so google results I came across this post, and with a little editing... it worked like a charm.
Here is what I ended up with as my final code for a standard Dupal install that would want to use it as a solution.
The Code
$('#primary li').hover(function(){
$(this).addClass('active');
}, function() {
$(this).removeClass('active');
});
Comments
suv
Keep up the good work!!
Bug Fix
642-504 642-515 646-363
Crystal Jewelry
sanejenny
billiards supplies
Post new comment