The new version of jQueryUI (1.9) comes with the native tooltip widget. After testing with it, it works fine if the content (value of the title attribute) is short. But if the content is long, the tooltip, once displayed, will overlap the input text.
There is a demo on the official site.
When you hover the mouse cursor over the Your age text <input>
, the tooltip displayed overlaps the text input. I am not sure if this is the desired behaviour of the widget.
I would like it to stay on the right side of the text input and break lines if necessary.
编辑:演示页面不再显示原始问题,因为演示已更新为使用 jQueryUI v1.10,其中位置代码已更新以更好地放置工具提示 - 请参阅http://api.jqueryui.com/tooltip/#期权头寸
我在 jsFiddle 上重新创建了原始问题的演示。