JQuery Tools tabs conflicts with JQuery UI

Emir picture Emir · Jan 5, 2011 · Viewed 18.4k times · Source

I'm using JQuery tools' tabs feature and at the same time I use JQuery UI.

If I include both JS libraries, Jquery tools with tabs does not work.

How to fix this conflict? Any help is appreciated.

Thanks in advance.

Answer

mu is too short picture mu is too short · Jan 5, 2011

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) {

to something like this:

$.fn.fpTabs = function(query, conf) {

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.