4

In the project which am working, we use alot of jquery plugins to make it work exactly the way we want. We use jquery 1.5 as a common version of jquery library for all the plugins. But some plugins works only on jquery library version 1.3 and few other works on jquery 1.7 version. We really don't think using more than one version of jquery in the same project is a good idea.

How can i make all the plugins work with one jquery file ? any fixes ? any ideas ? please share with me as this is really frustrating that we couldn't progress more in the development.

Bala
  • 3,576
  • 10
  • 46
  • 74
  • 2
    @diEcho +1 and cheers for accompanying me..:) ...this is really frustrating drawback of jquery..! – Bala Dec 23 '11 at 06:31
  • Agreed but at the same time jquery would not be where it is today if it was always worrying about backwards compatibility and bloated code. – John Magnolia Mar 04 '13 at 11:40
  • I feel this is the plugin developers who should release multi version of their plugin to work with different versions of jquery 1.3 – John Magnolia Mar 04 '13 at 11:40

3 Answers3

1

Anything that works with 1.5 should work with 1.7 as not a lot was removed to the best of my knowledge.

In terms of the plugin(s) that works only with 1.3, I'd look into replacing that... its very rare to find a jQuery plugin that doesn't have a few other similar plugins which are more regularly updated.

As a general rule of thumb, you want to make sure that you only use plugins (as with other dependancies in code) that are updated on a regular basis. Therefore those that only support 1.3 should be ditched as soon as possible.

You should only ever use a recent copy of jQuery. Any third-party code that locks you into using an 'old' version isn't worth keeping.

isNaN1247
  • 17,793
  • 12
  • 71
  • 118
  • The problem is mainly with 1.3 version as am using 1.5 version which makes most of the plugin work in my project.. ! – Bala Dec 23 '11 at 06:36
  • My point is that those plugins that work with 1.5 should also work with 1.7 without a problem, and that your problem is keeping the 1.3 dependant code... its bad for you to keep it! :) – isNaN1247 Dec 23 '11 at 06:38
  • Thanks for your guidance!Hereafter I will follow as you said ..!! – Bala Dec 23 '11 at 06:39
  • Yeah i understood that...now am gonna wipe off those plugins and get some new stuffs to work with newer jquery version :)... – Bala Dec 23 '11 at 06:40
1

The only way to answer this is to examine each and every plug-in you're using that doesn't work with 1.7, figure out why it doesn't work and patch/fix it or switch to some other plug-ins with similar functionality that does work with the desired jQuery version. There is no other magic bullet.

If you want all your plugins to work with the same jQuery version, then you have to make all your plug-ins work with the same jQuery version. Were you expecting something else?

I don't know how you expect us to help further without even telling us know which plug-ins they are or what the issues are with which versions of jQuery.

jfriend00
  • 683,504
  • 96
  • 985
  • 979
1

below are some articles that may be helpful for both of us

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

How do I run different versions of jQuery on the same page?

http://jquery-howto.blogspot.com/

jQuery forum

Using jQuery.noConflict, you can make multiple versions of jQuery coexist on the same page. For instance

<script src='jquery-1.3.2.js'></script>
<script>
var jq132 = jQuery.noConflict();
</script>
<script src='jquery-1.4.2.js'></script>
<script>
var jq142 = jQuery.noConflict();
</script>
Community
  • 1
  • 1
xkeshav
  • 53,360
  • 44
  • 177
  • 245