我已经阅读了api文档和论坛,并试图在最初设置后更改工具提示的内容,但它无法正常工作.我究竟做错了什么?
HTML:
<p id="666">tooltip</p>
Run Code Online (Sandbox Code Playgroud)
JQUERY
var qconfig = {
show: 'mouseover',
hide: { when: 'mouseout', fixed: true },
position: { my: 'bottom center', at: 'top center', adjust: {y: 8} },
style: { classes: 'qtip-light qtip-shadow' }
};
$("#666").qtip($.extend(true, qconfig, { content: { text: "before", title: "title is here" }}));
$("#666").qtip('option', 'content.text', 'after');
$("#666").qtip('api').set('content.text', 'another after');[/code]
Run Code Online (Sandbox Code Playgroud)
我希望工具提示的内容是"之后"或"之后的另一个",但它仍然是"之前".请帮忙.
JSFiddle在这里:http://jsfiddle.net/Af64c/
您可以更改此类内容
$('#666').data('qtip').options.content.text = 'after';
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3341 次 |
| 最近记录: |