You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

tools conflicts with jquery-ui Created Sep 6, 2009

This thread is solved

Views: 2902     Replies: 9     Last reply 4 weeks and 2 days ago  
You must login first before you can use this feature

julienbri

Posts: 5

Registered:
Sep 4, 2009

tools conflicts with jquery-ui

Posted: Sep 6, 2009

Hi,

I am using functions from both jquery-ui and tools.
In the header of my pages, I have the following:

	<script type="text/javascript" src="/js/jquery-ui-1.7.2.custom.min.js"></script>
	<script src="http://cdn.jquerytools.org/1.1.0/jquery.tools.min.js"></script>

The problem is that when I keep the header as above, some functions of jquery-ui are not found (i.e. datepicker).
And when I switch both libraries and put tools before query-ui, some functions of tools are not found(i.e. tabs)

Any good practices to fix this?

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1838

Registered:
Nov 16, 2007

» tools conflicts with jquery-ui

Posted: Sep 6, 2009

Reply to: tools conflicts with jquery-ui, from julienbri
Both libraries have jQuery.tabs in them. Please use just one of those to avoid conflicts.

brad_edelman

Posts: 1

Registered:
Sep 23, 2009

» » tools conflicts with jquery-ui

Posted: Sep 23, 2009

Reply to: » tools conflicts with jquery-ui, from tipiirai
I can see that if there are conflicts that you can use only jquery-ui or jquery tools and not both.

However, do you have a suggestion for which other library to use for the features that are in jquery-ui but not in jquery tools? julienbri mentions the datepicker, for example. Do you have a recommended calendar widget?

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1838

Registered:
Nov 16, 2007

» » » tools conflicts with jquery-ui

Posted: Sep 24, 2009

Reply to: » » tools conflicts with jquery-ui, from brad_edelman
you can use both libraries together. just don't include UI tabs (or Tools tabs) to avoid conflicts.

haven't encountered alternative to UI datepicker but I never really searched for one.

degenerate

Posts: 157

Registered:
Sep 19, 2008

» » » » tools conflicts with jquery-ui

Posted: Oct 16, 2009

Reply to: » » » tools conflicts with jquery-ui, from tipiirai
This one is pretty basic; I've used it instead of UI because UI is bloated:

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePicker.html

stanislaw

Posts: 2

Registered:
4 weeks and 2 days ago

Similar problem...

Posted: 4 weeks and 2 days ago

Reply to: » tools conflicts with jquery-ui, from tipiirai
Could you, please, look athttp://flowplayer.org/tools/forum/20/47018 ???
Thank you.

robertmglynn

Posts: 2

Registered:
Feb 18, 2010

Handling conflicts in jQuery libraries

Posted: Apr 7, 2010

Reply to: tools conflicts with jquery-ui, from julienbri
I've come across the same conflict between jQuery.ui and jQuery.tools. The solution I came up with is to rename the conflicting functions.

Create a js file and include the following:

$.fn.uitabs = $.fn.tabs;
delete $.fn.tabs;
what this does is takes the tabs() function already defined by the first library included and renames it. When the second library defines the tabs() function the first is kept under it's new name (in this case "uitabs", but it can be named whatever you like).

You must include the fix js file between the script tags of the two libraries and remember that the first will be renamed. In this example I am first including the jQuery.ui library, then the fix script, then the jQuery.tools library.

You can then call:

$("#tabs").uitabs(); // $.ui.tabs
$(".tabs").tabs(); // $.tools.tabs

Scoup

Posts: 2

Registered:
Apr 21, 2010

Datepicker and tooltip

Posted: Apr 21, 2010

Reply to: tools conflicts with jquery-ui, from julienbri
For jquery ui datepicker you can "ignore" the datepicker form..
IE:

<form>
  <input 1...>
  <input 2....>
  <input class="datepicker">
</form>

Lets see the js code:


$(".datepicker").datepicker();
$("form :input:not(.datepicker)").tooltip();

Now you have the datepicker of jquery ui and the tooltip on same form.

;)

zipnode

Posts: 1

Registered:
Oct 22, 2009

Conflicts with jquery and scripts

Posted: Jun 16, 2010

Reply to: Datepicker and tooltip, from Scoup
I'm having the same problem here

I've attempted to include the jquery.tools library after the following scripts and it caused errors.

Any thoughts or advice would be great. Otherwise, I'll prob abandon jquery.tools for straight jquery and a lightbox work around


   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

    <script type="text/javascript" src="js/jquery.easing.1.2.js"></script>
	  	<script src="js/jquery.anythingslider.js" type="text/javascript" charset="utf-8"></script>

I was working with overlay demo 1.8 Minimum set up and it worked great but when I combined the scripts my anythingslider.js script stopped working and shows scrollbars.

NNarhinen

Posts: 1

Registered:
4 weeks and 4 days ago

» tools conflicts with jquery-ui

Posted: 4 weeks and 4 days ago

Reply to: tools conflicts with jquery-ui, from julienbri
Hello,
when using jquery tools (1.2.3) with jquery ui (1.8.2) the "sortable" plugin from ui doesn't work. Can you reproduce and or advice how to fix?

the error (from firebug) is:
$("#sortable").sortable is not a function

and here's some code for reproducing:


<div class="demo">

<ul id="sortable">
	<li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 1</li>
	<li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 2</li>
	<li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 3</li>
	<li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 4</li>
	<li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 5</li>
	<li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 6</li>
	<li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 7</li>
</ul>

</div><!-- End demo -->


$("#sortable").sortable();