问题描述
我正在使用JQuery工具的标签功能,同时使用JQuery UI.
I'm using JQuery tools' tabs feature and at the same time I use JQuery UI.
如果我同时包含两个JS库,则带有选项卡的Jquery工具不起作用.
If I include both JS libraries, Jquery tools with tabs does not work.
如何解决此冲突?感谢您的帮助.
How to fix this conflict? Any help is appreciated.
谢谢.
推荐答案
您可以获得自定义的jQuery-ui构建,该构建不包含选项卡,但稍后可能会引起一些混乱.更好的方法,恕我直言,将是编辑jQuery工具tabs.js
并更改此行:
You could get a custom jQuery-ui build that that doesn't include the tabs but that might cause some confusion later on. A better approach, IMHO, would be to edit the jQuery-tools tabs.js
and change this line:
$.fn.tabs = function(query, conf) {
类似这样:
$.fn.fpTabs = function(query, conf) {
我在"flowplayer.org选项卡"中使用了"fpTabs",您可以使用任何适合您的名称.那应该清除您的冲突,而不会在其他任何地方引起问题.当然,您必须记住,如果升级了,则更改了tabs.js
,但这应该比处理无标签的jquery-ui.js
文件要麻烦的多.
I used "fpTabs" for "flowplayer.org tabs", you can use whatever name works for you. That should clear up your conflicts without causing problems anywhere else. Of course, you'd have to remember that you changed tabs.js
if you ever upgrade but that should be less troublesome than messing around with a tab-less jquery-ui.js
file.
这篇关于JQuery Tools选项卡与JQuery UI冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!