Wednesday, February 25, 2009

jQuery 1.3.2 and beyond

jQuery 1.3.2 has been released and although it is mainly a bug fix maintenance release, it does a little more, including:

  • Elements Returned in Document Order
  • .live() Can Now Prevent Bubbling
  • :visible/:hidden Overhauled
  • .height()/.width() Overhauled
  • Selector Speed-up in IE
  • .appendTo()/etc. Now Return Inserted Elements

It is also fun to look at the grab back of possible features on the table for 1.4 and beyond. Here are just a few:

  • jQuery.require (require JavaScript modules and CSS to load before ready runs)
  • Dynamic loading of modules when they’re needed (would require synchronous script loading in core)
  • $.contains (determine if an element is inside another one)
  • Handle HTML injection in XML documents (serialize a DOM then insert)
  • Implement a .extract()/.detach() method (remove the element from the DOM, leaves events and data intact)
  • Use querySelectorAll for element-rooted queries
  • Piggy-back on a central data cache, if one exists.
  • Allowing a function as the “setter” argument for .css() — like we have in .attr() — and maybe for .val(), .html(), and .text() as well.
  • Offset: Faster Initialization, use parseFloat, boundingClientRect check
  • Events: Have img.load check for .complete in IE, Multiple binding with namespaces, Event scoping, .live() improvements
  • Ajax: Use JSON API if available to parse JSON, Dynamic loading of stylesheets
  • Effects: Synchronized animations, fadeTo show also show the element, if it’s hidden
http://ajaxian.com/archives/jquery-132-and-beyond

No comments: