0

I am new at jquery and I am trying to combine 2 scripts that each seem to use a different file.

One uses:

http://code.jquery.com/jquery-1.7.1.js

while the other uses:

http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js

The problem is, if I leave 1.7.1 in there, then the script using 1.4.2 breaks. Is it generally safe to remove the 1.7.1 and just use the 1.4.2?

Also, what is the difference between a normal one and a .min. version?

Thank you :)

user1227914
  • 3,446
  • 10
  • 42
  • 76
  • possible duplicate of [Can I use multiple versions of jQuery on the same page?](http://stackoverflow.com/questions/1566595/can-i-use-multiple-versions-of-jquery-on-the-same-page) – Felix Kling Jun 15 '12 at 21:55
  • Have a look at the files, then you will see the difference ;) – Felix Kling Jun 15 '12 at 21:55

2 Answers2

0

1.7.1 contains features that 1.4.2 doesn't have. If any of those are used in the script referencing 1.7.1, and you instead use 1.4.2, that script referencing 1.7.1 will break. You can find changeset for 1.7.1 (over the prior version) at http://blog.jquery.com/2011/11/21/jquery-1-7-1-released/

Examples of some substantial changes following version 1.4.2

A .min version is minified (meaning unnecessary spaces are removed, variable names are shortened), so retrieving the script on page load takes less time and space. When you don't feel the need to debug jquery, you should use the .min versions.

ossek
  • 1,648
  • 17
  • 25
0

It's not safe to migrate, things can't stop working, no question about that. If you decide to do the migration you may need to check the roadmap to see things that changed from 1.4.2 to 1.7.1 and test very carefully main features currently using v1.4.2.

Although is totally recommended to use the latest version, migration can be a risky process that you'll have to weight analyzing your project restrictions.

File .min is a minified version of the js library. It means that the size was reduced removing unnecesary white space characters, new line characters and comments.

Claudio Redi
  • 67,454
  • 15
  • 130
  • 155