[英]How can I create an image tooltip hover over form labels with jQuery?
How can I put an image tooltip on the label of all radio buttons within a form? 如何将图像工具提示放在表单中所有单选按钮的标签上? I am using simple_form to generate the form markup, so each label has a for attribute (eg
for="reward_id_79"
) that I could use to link the label with its corresponding image img src='blah.jpg' id='reward_id_79'
. 我使用simple_form生成表单标记,因此每个标签都有一个for属性(例如
for="reward_id_79"
),我可以使用它将标签与其对应的图像链接起来img src='blah.jpg' id='reward_id_79'
。
Each radio input will have an associated image that I'd like to display in a tooltip popup with the user hovers over the label text. 每个无线电输入都有一个相关的图像,我想在工具提示弹出窗口中显示,用户将鼠标悬停在标签文本上。 I'd like not to alter the simple_form output, but instead have a series of hidden images elsewhere in the page.
我不想改变simple_form输出,而是在页面的其他地方有一系列隐藏的图像。
Take a look at the poshytips jquery plugin. 看看poshytips jquery插件。
http://vadikom.com/demos/poshytip/ http://vadikom.com/demos/poshytip/
It does pretty much what you need and is really easy to use. 它几乎可以满足您的需求并且非常易于使用。
你可以尝试一个jQuery工具提示插件 ,它看起来非常全功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.