TypeError: $(...).tooltip 不是函数 [英] TypeError: $(...).tooltip is not a function
本文介绍了TypeError: $(...).tooltip 不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有由 jquery 填充的 gridview.以下是我的代码的一部分,给出了上述错误:
I have gridview that is populated by jquery. Below is part of my code thats giving the above error:
var codes = $(this).find("Code").text();
$("td", row).eq(6).html($(this).find("oTotal").text());
if ($(this).find("Stock").text() == 'Y') {
$("td", row).eq(7).html('<a href="#" class="tooltip" title="This is my divs tooltip message!" id="' + codes + '" style="text-decoration:none">Y</a>');
$('#' + codes).live('click', function () {
$('#' + codes).tooltip();
});
}
else {
$("td", row).eq(7).html($(this).find("Stock").text());
}
我在 $('#'+ 代码).tooltip(); 上遇到错误;我有 jquery.ui/1.8.22 和 jquery/1.8.3.
I am getting an error on $('#'+ codes).tooltip(); I have jquery.ui/1.8.22 and jquery/1.8.3.
推荐答案
我认为工具提示不是您正在拉入的文件的一部分.您能否将 CDN 对 jQuery UI 的引用更新为:
I think tooltip wasn't part of the file you are pulling in. Are you able to update your CDN reference to jQuery UI to:
http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js
这篇关于TypeError: $(...).tooltip 不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文