开发者

JQuery simple tooltip

开发者 https://www.devze.com 2023-01-14 00:11 出处:网络
I\'m looking for some JQuery tooltip plugin or even a simple solution to show a dynamic value from an input field when I mouse over a determined link (text or image)

I'm looking for some JQuery tooltip plugin or even a simple solution to show a dynamic value from an input field when I mouse over a determined link (text or image)

I've tried a lot of plugins but none can give me the dynamic value of the field.

Example:

Input field: input type="text" name="example" id="example" value=""

Link for mouseover/tooltip:

a href="#" id="tooltip">value</a

The value of the input field will be changed by another JQuery function and it's working fine, but when I try to 开发者_Go百科show it's value using any tooltip plugin, doesn't work.

If I simple use the alert() function, it's working fine.

I don't need any fancy tooltip, only show the value of the input field.

Please, any solution?


We use tipsy for our tooltips on twitter.com, and it works great. It can generate the tooltip text dynamically using a callback function, like this:

HTML:

<input type="text" id="example" value="foo" />

JavaScript:

$("#example").tipsy({
  title: function() {
    return $(this).val();
  }
});

Here's a complete example/demo. There are plenty of configuration options to suit your needs.


look on this library

http://flowplayer.org/tools/demos/tooltip/index.html

0

精彩评论

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