5

Should there be any major issues to switch from jQuery 1.4.4 to jQuery 1.6.1?

I just noticed that all of the sites on our system were using 1.4.4.

So should i switch them all over to the newest one (1.6.1) or keep them as is, and if i do switch, what issues may I face?

JAAulde
  • 19,250
  • 5
  • 52
  • 63
Naftali
  • 144,921
  • 39
  • 244
  • 303

4 Answers4

6

Your safest bet is to go the jQuery Blog and go though the change logs from 1.4.4 to 1.6.1. Change logs call out feature changes that would require you to change your code.

Here's a sample:

http://blog.jquery.com/2011/05/12/jquery-1-6-1-released/

Ates Goral
  • 137,716
  • 26
  • 137
  • 190
4

You might have issues with attr. Prior to jQuery 1.6 attr("checked") returned a boolean, now on 1.6+ it returns the attribute value. To get the boolean value you have to use .prop (added on 1.6).

On jQuery's blog about 1.6.1 release you will find information to upgrade from 1.5.2 to 1.6.1. This post also tells you a lot of details about .prop and .attr. You will also find the full change log.

Both 1.5.1 release post and 1.5.2 release post doesn't present any information on upgrading, which might mean that there is no big changes to be done, but you have the complete list of changes for these versions that you might want to check guarantee.

See

Description: Get the value of a property for the first element in the set of matched elements.

Community
  • 1
  • 1
BrunoLM
  • 97,872
  • 84
  • 296
  • 452
  • might want to add this as well to your answer: http://stackoverflow.com/questions/5874652/prop-vs-attr but this should have been resolved in 1.6.1, no? – Naftali Jun 16 '11 at 17:33
1

It depends on what you use. I personally have had no issues when upgrading since 1.3. Best bet would be to look over the release notes, and see if anything you've used was impacted.

Either way if you decide to try it, test, test, test.

EDIT

One thing I forgot. I did have issues with $.ajax switching to using jsonp for json datatypes. But I think that got fixed in a later version.

Jeff Sheldon
  • 2,074
  • 1
  • 14
  • 23
0

Hi I've seen this page http://www.davidtong.me/upgrading-jquery-from-1-4-x-to-1-6-1/ that seems to outline the main issues:

  • prop() and attr()

  • Ajax and parseJSON

  • getAttribute on Flash objects

  • Plugins

penderi
  • 8,673
  • 5
  • 45
  • 62