开发者

how to do a [?] explanation/'tooltip' link?

Next to an input field, I want to have a small '[?]' link which will display a brief clarification. I would like this link to display this tooltip both when the mouse hovers over the [?] as well as when the [?] is clicked. There is no other action associated with this [?] link.

A normal tooltip (as provided by browsers when faced with HTML tag or the jquery tooltip plugin) disappears once the element is clicked, which is useful for most scenarios but not this one. How can I have the t开发者_如何学运维ooltip be shown on click, too?

<label for='myInput'>
   Type here
   <a href='#' title='brief explanation!'>[?]</a>:
</label>
<input id='myInput' name='myInput'/>

How can I achieve this effect?


You can do this with qTip. Use show: { when: { event: 'click' } }.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜