0

In the chain of this SO thread, I am extending the question. If I have two files say jquery.ui 1.8.12 and jquery.ui 1.10.3. If I use some ui functionality like datepicker,tooltip,throws me error for the older version of jquery (I want older version because one of my js plugin uses this) file How to handle this situation. how to link particular file for particular function call.

Community
  • 1
  • 1
Rajaram Shelar
  • 7,537
  • 24
  • 66
  • 107

1 Answers1

1

Yes you can do it:

By using jQuery.noConflict() to load multiple versions of jQuery is actually pretty simple.

Example from the blog(The blog is bit old but worth reading).

<!-- load jQuery 1.1.3 -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.1.3.js"></script>
<script type="text/javascript" src="jquery.dimensions.min.js"></script>

<!-- revert global jQuery and $ variables and store jQuery in a new variable -->
<script type="text/javascript">
var jQuery_1_1_3 = $.noConflict(true);
</script>

<!-- load jQuery 1.3.2 -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.3.2.js"></script>

<!-- revert global jQuery and $ variables and store jQuery in a new variable -->
<script type="text/javascript">
var jQuery_1_3_2 = $.noConflict(true);
</script>

So now you can use refer to your required version by using their references.

Demo of Different plugin usega

http://blog.nemikor.com/2009/10/03/using-multiple-versions-of-jquery/

Suresh Atta
  • 120,458
  • 37
  • 198
  • 307