Skip to content Skip to sidebar Skip to footer

Why To Add Two Links To Jquery In This Case

I have zero experience in Javascript and JQuery but I have used both in this document. The first one is to give support to IE for CSS3 transitions and is taken from CSS3 Hover Tran

Solution 1:

It is complicated and undesirable to put two different versions of jQuery in the same page. Your first goal is to avoid this entirely - you'd rather only have the newer version of jQuery in the page.

So, your first order of business is to do some research on the jQuery plug-ins you're using and see if they will all work with a common version of jQuery.

If you determine that they will all work with a common version of jQuery, then just include jQuery in your page before the plugins and include the plugins before your code that uses them. The jQuery code can go in the HEAD section or in the BODY section as long as it's before anything that tries to use it. The plug-in code can probably go anywhere after the jQuery code, but you'd have to consult the plug-in doc to make sure.

If you determine that you have to have two different versions of jQuery, then you need to work out how you go about doing that. Here's a related question on how that is done: Can I use multiple versions of jQuery on the same page?.

When using two versions of jQuery, you end up having to define a unique symbol that represents a particular version of jQuery using jQuery.noConflict() (not jQuery and not $) and then ALL code that uses that plug-in has to use that unique symbol.

Post a Comment for "Why To Add Two Links To Jquery In This Case"