jQuery – Version 1.4

Eine neue Version der jQuery Lib ist da mit über 200 Bugfixes!
Folgende Punkte freuen mich ganz besonders:

  • .text() works on text and CDATA nodes
  • Event Multi-binding
  • New events: `focusin` and `focusout`
  • jQuery.isEmptyObject()

ausprobiert habe ich es bis dato noch nicht, aber das kommt schon noch!
Hier der Changelog:
AJAX:

  • Nested param serialization.
  • JSON and script types auto-detected by content-type.
  • Etag support has been added.
  • Strict JSON parsing, using native JSON.parse.
  • Serialize HTML5 elements.
  • Context for Ajax Request.
  • Success callback receives XHR object as third argument.
  • Explicitly set a content-type.
  • Explicitly specify a JSONP callback name
  • Avoid pre-flighting cross-domain XHR
  • Query.ajax() is now using onreadystatechange instead of a timer

Attributes:

  • The performance of .css() and .attr() has been improved.
  • The .attr() takes a function setter.
  • .val( Function )
  • .text() works on text and CDATA nodes

Core:

  • Quick Element Construction
  • .eq(-N), .get(-N)
  • New .first() and .last() methods
  • New .toArray() method
  • jQuery() returns empty set
  • jQuery(“TAG”)
  • jQuery(“< div >”) jQuery(“< div/ >”) and jQuery(“< div ></ div >”)

CSS:

  • The performance of the .css() method has seen a 2x performance improvement.
  • The performance of the .addClass(), .removeClass(), and .hasClass() methods has seen a 3x performance improvement.
  • .toggleClass() can toggle multiple classes

Data:

  • .data() returns Object and .data(Object) sets the object
  • Data cache is no longer created if it isn’t needed

Effects:

  • Per-property Easing

Events:

  • New Method: jQuery.proxy()
  • Event Multi-binding
  • `change` and `submit` events normalized
  • New events: `focusin` and `focusout`
  • All Events Can Be Live Events
  • live/die now work with context
  • Make sure ready event has body at least
  • Unload is sped up in non-IE browsers that don’t need memory leak hand-holding.

Manipulation:

  • Performance of .append(), .prepend(), .before(), and .after() has been improved.
  • Performance of .html() has been improved by nearly 3x.
  • Performance of .remove() and .empty() has seen over a 4x speed increase.
  • New Method: .detach()
  • New unwrap() method.
  • Caching in domManip
  • before, after, replaceWith on disconnected nodes
  • .clone(true) also clones data

Offset:

  • .offset( coords | Function )

Queue:

  • New .delay() method
  • .clearQueue()

Selectors:

  • “#id p” is faster

Traversing:

  • .index(), .index(String)
  • New .has() method
  • New .nextUntil(), .prevUntil(), .parentsUntil() methods
  • .add(String, Element)
  • .closest(filter, DOMElement)

Utilities:

  • jQuery.isEmptyObject()
  • jQuery.isPlainObject()
  • jQuery.contains() (jQuery.contains() documentation, commit)
  • jQuery.noop (jQuery.noop() documentation, commit)
  • jQuery.unique()

Miscellaneous:

  • jQuery.browser is now engine-centric
  • Better support for applets
  • No longer use arguments.callee
  • Now use Closure Compiler instead of YUI Min

Internal Reorganization:

  • The old ‘core.js’ file has been split apart into ‘attribute.js’, ‘css.js’, ‘data.js’, ‘manipulation.js’, ‘traversing.js’, and ‘queue.js’.
  • The ready event has been moved into core.js (as it’s a fundamental part of jQuery itself).
  • The majority of core matches the new jQuery Core Style Guidelines.
  • The logic for CSS and attributes have been split and aren’t so intertwined anymore.
This entry was posted in Home, jQuery Scripts and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>