TypeError:$(...).tooltip不是函数 [英] TypeError: $(...).tooltip is not a function

查看:135
本文介绍了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.

推荐答案

我认为工具提示不是您要导入的文件的一部分.您能否将对jQuery UI的CDN参考更新为:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆