Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issues switching from jQuery 1.4.4 to 1.6.1

Tags:

jquery

version

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?

like image 544
Naftali Avatar asked Jun 16 '11 17:06

Naftali


2 Answers

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/

like image 124
Ates Goral Avatar answered Sep 23 '22 14:09

Ates Goral


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

  • jQuery 1.6.1 release notes
  • jQuery 1.5.2 release notes
  • jQuery 1.5.1 release notes
  • javascript - .prop() vs .attr()
  • jQuery .prop

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

like image 30
BrunoLM Avatar answered Sep 22 '22 14:09

BrunoLM