21

Can JQuery UI and JQuery tools work together? I.e. If I include both libraries on one page, will it still work?

Andy Li
  • 5,894
  • 6
  • 37
  • 47
rockstardev
  • 13,479
  • 39
  • 164
  • 296

4 Answers4

31

They can be used together. The problem is that there is a jquery.tabs created in both libraries. That conflict causes the second script to not load. You have to go to http://jquerytools.org/download/ to build a custom download and do not include tabs. I just had this problem and was able to resolve it by doing this.

The only downside is you can't use the CDN, since you're stuck downloading a custom JS file and including it in your site.

Lee Li
  • 45
  • 2
  • 11
  • 5
    If you however want to use the jquery tool tabs instead of the jquery-ui tabs, go here [link](http://jqueryui.com/download) and create a custom js file without the tabs. – Aron Woost May 05 '11 at 11:18
  • similiar apply to slider i.e. Rangeinput of jQuery Tools. RangeInput will call .slider() that will stop second script from loading. – IT ppl Nov 02 '12 at 09:13
2

Yes, of course, but I don't know why you would want to

Josh Stodola
  • 81,538
  • 47
  • 180
  • 227
  • 2
    I've got two components in Drupal. One uses Jquery tools, and the other uses Jquery UI. Problem is, if both are running, everything break. Links turn into lightbox links etc. Very strange. – rockstardev Sep 03 '09 at 17:09
  • Did you install some CSS files for jQueryUI? – Milan Babuškov Sep 03 '09 at 17:10
  • no, i did not. i think it must be that lightbox is not compatible with the tools or something. i cant figure it out. – rockstardev Sep 03 '09 at 17:16
  • jQuery Tools tabs provides a simple way for any list of elements on the page to toggle the display of any other list of elements. (jQuery UI tags forces you into their markup/style.) But jQuery Tools lacks autocomplete, which jQuery UI has. – Carl G Nov 26 '12 at 17:45
1

Yes it is possible. You have to load/include all the jQuery UI libraries[both js and css] before loading the jQuery Tools files. I faced the same problem as yours. Got it fixed by doing the trick.

Anik
  • 2,692
  • 2
  • 22
  • 25
0

You may also want to read through this thread which details how to rename the tabs function in one library or the other. I had a similar situation with two Wordpress plugins. One was using jQuery Tools and the other was using jQuery UI. Renaming the function in one library or the other (and then changing all the subsequent calls to it, of course) fixed my problem, although admittedly it is a little kludgey.

Community
  • 1
  • 1