I have some links and a div in my web page.On mouse over the link I need to display the div j开发者_运维知识库ust bellow the link.How to do it so that on mouse hovering any link the div will display just bellow that link only(I mean like a tooltip)?
Steps to do
- Add the tooltip div with absolute position and hide it.
- Bind hover event to andchor tags.
- Get element position using
.offset()
method - Set the top and left position of the tooltip div with the values from
.offset().top
and.offset().left
精彩评论