Migrating jQuery 1.4.x to jQuery 1.6.x
When migrating from jQuery 1.4.x to jQuery 1.6.x you have to consider some changes.
I guess you can find all of them anywhere on the jQuery Blog but when you don’t have the time or the patience to read all of the posts you have to try and test it by yourself.
I found out some of the changes the hard way when I migrated the Matterhorn Engage UI. Here is a list (mainly for me to remember them):
- .attr and .prop
- in jQuery 1.6 the handling of DOM attributes and DOM properties is split apart into separate methods
- .attr first checks if the attribute is explicitly written in the HTML code, after that it looks at the object created by the HTML tag, and inspects its object property
- .prop sets or gets properties on DOM elements
- see jQuery 1.6 released
- for ajax calls there are no options like ‘yourAjaxCall.onreadystatechange = anyFunction;’ any more, you have to use ‘success’, ‘error’, etc. inside your ajax-request
- the function generation from jsonp ajax-requests now contains underscores (‘_’), so you have to adapt your save patterns on server side
Related sites:
- My Matterhorn Branch Issue Tracker for the migration
- jQuery Blog: jQuery 1.6 search results
- David Tong – Upgrading jQuery – from 1.4.x to 1.6.x
To be continued…
Advertisement
Categories: Programming, Software
Ajax, DOM, Engage, jQuery, Matterhorn, Migration, UI