开发者

Display just below the link on mouse over.

开发者 https://www.devze.com 2023-01-20 03:16 出处:网络
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 j

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

  1. Add the tooltip div with absolute position and hide it.
  2. Bind hover event to andchor tags.
  3. Get element position using .offset() method
  4. Set the top and left position of the tooltip div with the values from .offset().top and .offset().left
0

精彩评论

暂无评论...
验证码 换一张
取 消