简体   繁体   English

jQuery工具提示自定义提示

[英]jQuery Tooltip Custom Tip

I am trying to have a custom tooltip for my images when the user hovers over them using jQuery Tool's Tooltip plugin . 当用户使用jQuery Tool的Tooltip插件将鼠标悬停在图片上时,我尝试为该图片提供自定义工具提示 In the jsfiddle example you will see two rows. jsfiddle示例中,您将看到两行。 The top row is using the custom tip option, whereas the bottom row uses the regular title attribute. 最上一行使用自定义提示选项,而下一行使用常规标题属性。

As you can see, the tooltip sticks around when you mouse over them while the ones on the top row using the custom tip disappears when the mouse moves away from the image. 如您所见,当鼠标悬停在工具提示上时,工具提示会停留在周围,而当鼠标移离图像时,使用自定义提示的第一行工具提示会消失。 They don't have an example in their documentation for this specific option so I am not exactly sure how it is supposed to behave. 他们的文档中没有关于此特定选项的示例,因此我不确定该如何运行。

I think it might just be a edge case in the tooltip code... they don't expect you to use the same custom content in every tooltip. 我认为这可能只是工具提示代码中的一个极端案例……他们不希望您在每个工具提示中使用相同的自定义内容。 But, if you make three divs with content and point the tooltips to each different one, it works as expected ( updated demo ): 但是,如果您将三个div包含内容并将工具提示指向每个不同的div,则其将按预期工作( 更新的演示 ):

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM