Using jQuery as an alternative to csshover3


csshover3.htc works to add hover to all elements in IE However, it does come with a performance hit. It is always good to have alternative; sometimes different scripts cause problems for each other.

If jQuery is being used hover can be added by this code:

$(".tab").mouseenter(
function (){
$(".dropdown", this).css("display", "block");

}
);
$(".tab").mouseleave(
function (){
$(".dropdown", this).css("display", "none");
}
);

It actually is using the mouse enter event.

A few of the IE bugs to watch out for include.

1> When “LI” is displayed as a block inside a container even when it it filled a position:relative element appears to the right not below the tag. However making the “A” anchor tag a block works properly. Both need to be used as blocks so the drop down remains a child of the ul or li element.

2> When an element is even a position relative element is displayed in a UL, which should not cause the size of a ul to change it does; the ul element needs to be changed to a block with a specific size.

3> When the anchor tag is sized to a block the width of the container the links in the container also overflow and space is created below the link. These tags need to be changed back to display inline with proper usage of CSS rules.

Stats normally confirm that the dropdown get a considerable amount of attention. These should be styled.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: