I have an absolute positioned div that is shown on hover of an a. Since it is absolutely positioned at the base of the anchor (top:0; left:0), I wish to let the user to move from the anchor to the div without hiding the div.
Actually, I prepared a piece of JQuery code, but I’ve only be capable to let the div to be shown on hover. When I move from the anchor to the div, the latter is obsiously hidden.
Look at the JSFiddle to look what I did.
Thanks in advance.
First of all, you are over complicating everything by using javascript. You do not need it in this case, as you can just use a parent container to handle the hover action.
I would personally do it like this: http://jsfiddle.net/qLUf9/
And the CSS:
Please note: IE6 does not support the
:hoverattribute on block elements. For IE6 and below, you must use some basic javascript to add a class such ashoveredto that element. You can read more about fixing the IE6 hover bug here: http://robspangler.com/blog/hover-pseudo-class-bug-fix-for-ie6/