Can JQuery UI and JQuery tools work together?
Asked Answered
S

4

21

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

Spacetime answered 3/9, 2009 at 17:6 Comment(0)
N
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.

Neurasthenic answered 12/11, 2009 at 12:46 Comment(2)
If you however want to use the jquery tool tabs instead of the jquery-ui tabs, go here link and create a custom js file without the tabs.Brag
similiar apply to slider i.e. Rangeinput of jQuery Tools. RangeInput will call .slider() that will stop second script from loading.Takeo
F
2

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

Falco answered 3/9, 2009 at 17:7 Comment(4)
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.Spacetime
Did you install some CSS files for jQueryUI?Turgid
no, i did not. i think it must be that lightbox is not compatible with the tools or something. i cant figure it out.Spacetime
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.Behalf
B
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.

Brenza answered 4/12, 2012 at 10:8 Comment(0)
P
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.

Pantomimist answered 25/3, 2013 at 20:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.