jquery qtip 插件
我正在使用 jQuery qTip 插件,但无法从另一个元素加载 html 内容。
我有以下代码:
$('.tip').qtip({
content: {
text: $(this).next('.product_info').html()
}
});
使用以下 html:
<a href="#" class="tip">An Image</a>
<div class="product_info">Some content</div>
问题是我似乎无法使用“$(this)”,那么如何引用当前的“.tip”?
谢谢!
I am using the jQuery qTip plugin and am having trouble loading html content into it from another element.
I have the following code:
$('.tip').qtip({
content: {
text: $(this).next('.product_info').html()
}
});
with the following html:
<a href="#" class="tip">An Image</a>
<div class="product_info">Some content</div>
The problem is that I cannot seem to use "$(this)" so how can I refer to the current ".tip"?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这个问题的答案将为您解答:
qtip jquery插件显示链接中的文本
基本上你需要循环检查你的东西,先给小费,然后再单独给小费,这样就可以了;
i think this question's answer will answer this for you:
qtip jquery plugin to display text from link
basically you need to loop through your things to tip and then tip then individually and this will work;