Web Development News, Tips, Insights | Website Magazine

HOT: What's Inside jQuery 1.8

Written by Peter Devereaux | Aug 14, 2012 5:00:00 AM

A new version of - and just nine short months since jQuery 1.7 was made available. What lucky designers and developers we are! With a smaller code size (approximately 100 bytes smaller than 1.7.2) and with more than 160 bugs closed, let's take a closer look at JQuery 1.8:

- The Sizzle selector engine has been re-architected and is now faster and more efficient. Most browsers have querySelectorAll method but there have been some (serious) cross-browser implementation troubles which 1.8 solves and managed to provide coded fallbacks for IE6/7. 

- Animations have been quite cumbersome to work with through jQuery but 1.8 addresses animation performance and it has improved dramatically as a result. While CSS3 offers  better effects (and with less code), it is unlikely that jQuery and JavaScript-powered animation will dissappear (at least not in the short term). That being said, there are some new additions for animations - namely the use of progress callbacks in Primises - see the code in action here

- jQuery 1.8 now automatically adds required prefixes when a CSS property in methods such as .css() or .animate() are used. This update makes it possible to apply a single transform and -webkit-, -moz-, -ms- and -o- prefixes will be pre-pended.

- Improved modularity is also a noteworthy feature in the 1.8 build. It's not possible to reduce the already small size by using the grunt-based build systems to remove features that are not required. 

The jQuery 1.8 code is available for download here: 

https://code.jquery.com/jquery-1.8.0.min.js
(compressed and minified, for production)

https://code.jquery.com/jquery-1.8.0.js
(uncompressed, for debugging)