Reputation: 4183
Currently I use 1.4.4 in my sites, and considering upgrading to the latest (1.6.4). In your experience, is there any reason why I shouldn't just replace the jquery file (I host it in my server). What things should I be careful of?
Upvotes: 2
Views: 502
Reputation: 106412
I found this blog that covers all the important points...
http://davidtong.me/upgrading-jquery-from-1-4-x-to-1-6-1
Paraphrased tips:
.attr()
... There are many that should now be .prop()
This should apply for all 1.4.x -> 1.6.x releases.
You might also want to take a look at the 1.7 release candidate notes as that is soon approaching as well...
Upvotes: 2
Reputation: 98748
There are some semantical fixes in jQuery 1.6.
For example, certain things like defaultValue
and checked
have always been considered to be "properties", but in the past, jQuery has accessed them as if they were "attributes". jQuery 1.6 now correctly accesses "properties" with prop
rather than attr
.
Therefore, you may need to update lines of code that use attr()
and removeAttr()
, as appropriate, to prop()
and removeProp()
.
Otherwise, check the website of each plugin to see if there are updates and apply them. Then update jQuery and see what happens. You can always put it back the way it was.
Upvotes: 1
Reputation: 7802
have a look through the release notes and look at the breaking changes. see if any of those will affect your code, and go from there.
personally, i'm still using 1.4.2 on one of my projects b/c there was some changes to the way ajax requests / data was handled (i don't remember exactly what) and it completely broke a lot of my model binding and such.
Upvotes: 1
Reputation: 4998
You should check any plugins for compatibility and upgrade those and thoroughly test everything after upgrading. Otherwise it should be fairly painless.
Upvotes: 0
Reputation: 597392
The thing that can break is plugins. You should:
Upvotes: 1