$(...).tooltip不起作用,因为旧的jQuery UI 1.8.16库导致jQuery 1.9.2不起作用?如何解决这个问题? [英] $(...).tooltip is not working since jQuery 1.9.2 is not working due to old jQuery UI 1.8.16 library? How to fix this?

查看:268
本文介绍了$(...).tooltip不起作用,因为旧的jQuery UI 1.8.16库导致jQuery 1.9.2不起作用?如何解决这个问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个基于重型PHP框架构建的网站上.

I'm working on a website which is built in some heavy PHP framework.

因此它已经包含了 jQuery UI 1.8.16 库.现在,我必须在一个网页上实现$(...).tooltip功能.该功能在jQuery UI 1.8.16中不可用,但在 jQuery 1.9.2 中可用.

So it already has included jQuery UI 1.8.16 library. Now I have to implement $(...).tooltip functionality on one web page. This feature is not availabe in jQuery UI 1.8.16 but it is available in jQuery 1.9.2 .

<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>

因此,我将以下行添加到要实现$(...).tooltip功能的HTML文件中.但仍然在萤火虫中,我收到以下错误:

So I included following line into the HTML file where I want to implement the $(...).tooltip functionality. But still in firebug I got following error:

TypeError: $(...).tooltip is not a function

如何解决此问题?有人可以在这方面帮助我吗?

How to resolve this issue? Can someone please help me in this regard?

推荐答案

您只能从要构建自定义jQuery UI库,请检查以下各项:

To build a custom jQuery UI library, check the following items:

  • UI核心

  1. 核心
  2. 小工具
  3. 位置

  • 小部件

    1. 工具提示

  • 主题(选项l)

  • Theme (optionl)

    然后在jQuery核心和样式表之后加载JS库.

    Then load JS library after jQuery core as well as stylesheets.

    之后,您可以简单地初始化小部件.

    After that you can simply initialize the widget.

    $( "#tooltip" ).tooltip();
    

    这是一个有效的示例.

    这篇关于$(...).tooltip不起作用,因为旧的jQuery UI 1.8.16库导致jQuery 1.9.2不起作用?如何解决这个问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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