Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Why should I upgrade Jquery From 1.4.2 to 1.8.2

I am using Jquery 1.4.2 and everything is stable. Is it important to upgrade to the latest version and why?

user-image
Question added by Hazem Qannash , Technical Team Leader , Bayt.com
Date Posted: 2012/10/11
Islam AlZatary
by Islam AlZatary , Sr. Software engineer at Evalufy (Bayt product) , Bayt.com

Because any new plugin or new functionality using latest version of Jquery, and the latest version of Jquery as performance is better than old version and several bug fixes, so you must keep update with latest version of Jquery. But must be careful to test all pages because there is some functions in old version not work properly in the new version of Jquery.

Osama Abu Quboh
by Osama Abu Quboh , Front End Engineer , Bayt.com

1-Made a number of improvements. 2-Add new set of features. 3-New plug-ins of jQuery would probably require the new version. 4-Modularity: also removed a number of the inter-dependencies that exist in the jQuery source (in-between modules).

Muhammad Bilal Ahmed
by Muhammad Bilal Ahmed , Senior Front End Developer , Seven Software Development

You should upgrade with each release of jQuery -- just take a peek at the update logs before updating. The jQuery team is very good about documenting API changes, and -- even when the API does change -- it's not uncommon for them to support deprecated calls. At this point, the vast majority of the API is quite stable and probably won't change. Most changes are behind-the-scenes bug fixes that do not affect the outward API. This is especially true with the latest releases (1.8+). Another great reason to update is because regardless of whether or not you remain on a project, that project will be maintained by somebody after you're done with it. Upgrading to latest version is beneficial for you, future developers and users -- because the newer versions of jQuery blow the older ones out of the water... so go ahead and update the thang

Mohammad Arif
by Mohammad Arif , Principal Engineer UI , NatWest Group

Assume you have got2 mobiles, one is basic without color display, bigger screen etc. and second is smart loaded with all features, which one would you prefer? Anyhow would recommend jQuery2.0 where you can build your own custom jquery API using Grunt Task Runner. You can check my talks on the same at http://www.slideshare.net/arif_iq/grunt-

Melroy Coelho
by Melroy Coelho , Principal Software Engineer , Epicor

What components of jQuery do you currently use is the first question I'd ask. There are a few reason to upgrade a version of jQuery and some are listed below - Browser engines have moved past the call structure you are using and no longer support any of the calls that the framework is making (A good example of this is Google's aggressive push to eliminate the browser object and move developers towards testing browser functionality vs what browser it is) - You're using other libraries and frameworks which require an upgrade - You have a need to tap into advanced in-browser implementations for how JScript gets executed and the library you are using doesn't really offer you any of those optimizations. There is always a need to feel like the latest is the best but as mentioned before, reading the documentation or blogs to see what you are getting and what is being lost as part of the upgrade is just as important as asking why you want to upgrade. I am sorry but there is no real easy answer here because using1.10 vs1.4 vs1.X vs2.x isn't really the question more than the true requirement for moving it up. If you're working on projects that are transitioning towards the use of components that really need a later version of jQuery and you must move in that direction then I'd say the decision is made for you already but if you don't really need to and your project is stable, I would say you have a few more releases to go before jQuery decides to yank1.4.x from the code libraries and even then you could still technically run it because no browser out there cares if you are using jQuery, Dojo, etc. All they care about is that the Jscript syntax and usage is correct leaving them to decide what the best route of implementation is. I hope that helps.

Penupothula Srinivas
by Penupothula Srinivas , Field HSE Supervisor , SAIPEM FIRENZE FPSO

Career grow thing and knowledge

Mayank Majithiya
by Mayank Majithiya , Senior Web Application Developer , Bosleo Technology

  1. Do not use offset option in position properties, e.g. code $element.position({my: 'center center', at: 'center center', offset: '5 -10'}) should be replaced with $element.position({my: 'center center', at: 'center+5 center-10'}).
  2. Do not use $element.bind(), $element.live(), $element.delegate() to assign event handler, use $element.on().
  3. Do not use browser sniffing with $.browser, try to use feature detection instead ($.support).
  4. Do not use deferred.isRejected(), deferred.isResolved(), use deferred.state() instead. Do not use deferred.pipe(), the deferred.then() method should be used instead.
  5. Do not use the $elements.size() method, use the $elements.length property instead. The .size() method is functionally equivalent to the .length property; however, the .lengthproperty is preferred because it does not have the overhead of a function call.
  6. Checkbox/radio state in a .trigger()ed "click" event now has the same state as in a user-initiated action.
  7. Changed naming convention for .data() keys, e.g., ui-dialog instead of dialog. (http://jqueryui.com/upgrade-guide/1.9/#changed-naming-convention-for-data-keys).
  8. Do not use $.ui.contains(), use $.contains() instead.
  9. Each widget instance already has unique identifier this.uuid and event namespace this.eventNamespace = "." + this.widgetName + this.uuid. Do not generate similar things manually.
  10. Do not use $element.focus(n) - it is deprecated. Use setTimeout(function() { $element.focus(); }, n);.
  11. Do not use $element.zIndex() - it is deprecated.
  12. Do not use $.ui.keyCode.NUMPAD_* constants - they are removed.
  13. Do not use $element.data('someWidget') to retrieve widget instance. Use instance() method:$element.someWidget('instance'). Unlike other plugin methods, the instance() method is safe to call on any element. If the element is not an instance of the given widget, the method returns undefined: $('<div></div>').dialog('instance') /* returns undefined instead of throwing Error */.

Original upgrade guides and full list of changes:

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.