$(...).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?
问题描述
我正在一个基于重型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?
推荐答案
To build a custom jQuery UI library, check the following items:
-
UI核心
- 核心
- 小工具
- 位置
小部件
- 工具提示
主题(选项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屋!