我已经阅读了api文档和论坛,并试图在工具提示最初设置之后更改它的内容,但是它不起作用。我做错了什么?
HTML:
<p id="666">tooltip</p>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]我希望工具提示的内容是“后”或“后面的另一个”,但它仍然是“之前”。请帮帮忙。
JSFiddle在这里:http://jsfiddle.net/Af64c/
发布于 2013-09-10 23:28:22
您可以像这样更改内容
$('#666').data('qtip').options.content.text = 'after';FIDDLE
https://stackoverflow.com/questions/18729805
复制相似问题