jQuery 1.4 Released, Happy 4th Birthday jQuery

来自jquery官方网站的消息 ,目前最流行的JavaScript/Ajax库jQuery新版本1.4已经发布,为jQuery项目4周年14天庆祝送上一份大礼。

  1.4的压缩版只有23K,未压缩版154K。此外,Google也在自己的服务器上提供了副本,作为Google Ajax API的一部分,可以直接引用。

  jQuery 1.4对代码库进行了内部重写组织,开始建立一些风格规范。老的core.js文件被分为attribute.js, css.js, data.js, manipulation.js, traversing.js和queue.js。CSS和attribute的逻辑分离。并修正了207个老版本的错误。

  主要新特性有:

  1. 常用方法的性能大幅提升 。重写了大部分较早期的函数。

  2. 更容易使用的设置函数 (setter function)。为所有对象新增了许多易用的设置函数。

  3. Ajax方面的改进 。引入了许多Ajax和JSON处理方面的更新,包括HTML5元素的序列化。

  此外,attribute(改进了.attr()的性能)、jQuery()核心函数、CSS(.css()性能有两倍提升)、特效和事件、DOM操作等也有显著改进。

翻译自:http://techie-buzz.com/internet-tools/jquery-14-released-on-4th-jquery-birthday.html

以下是官方文档:

JQuery 1.4 Roadmap

From jQuery JavaScript Library

Jump to: navigation , search
<!-- start content -->

ROUGH NOTES This is just some rough notes for things to look at for 1.3.x/1.4.

Contents

[ edit ]

Core

  • jQuery.require (require JavaScript modules and CSS to load before ready runs)
 jQuery.require("foo.js");

jQuery.require("foo2.js");

jQuery(function(){ ... });

See also xLazyLoader

  • Dynamic loading of modules when they're needed (would require synchronous script loading in core)
  • $.ready failover. If not enough functionality is provided, have ready gracefully not load.
  • Widget Factory
  • .toArray() (As alternative to .get())
  • .get(-1) Allow for negative numbers to .get().
  • $.isObject() (Possibly for use by deep extending)
  • Use $.isArray() and $.isObject() for deep extending Discussion , Discussion
  • Implicit ready event like Mike Alsup is doing with his plugins now .
[ edit ]

DOM

  • $.contains (determine if an element is inside another one)
 jQuery("div").contains(DOMElement)

[ edit ]

Selectors

[ edit ]

Attributes / CSS

[ edit ]

Data

[ edit ]

Offset

[ edit ]

Events

[ edit ]

Ajax

 $.ajax(type, url, options);

  • Support options argument in $.get and $.post
 $.get(url, data, dataType, options);

$.post(url, data, dataType, options);

[ edit ]

Effects

[ edit ]

Structure

  • Reduce the number of function calls needed for common jQuery methods
  • Split up jQuery structure into smaller modules (core, traversing, manipulation, attributes/css)
  • Make it possible to only load the core module and be able to load all the rest dynamically
    • Seems like this would force us to expose a lot of the private methods/properties we have right now and potentially ditch the use of a closure.
  • Passing the XHTML test suite
  • Passing Object.prototype tests
  • Cache static objects
  • Standardize RegExp usage (in 1.3.3)
  • Improve RegExp Callbacks (in 1.3.3)
  • Working in evalInSandbox
  • Keep a separate data() cache for the document object (to avoid any obvious pollution).
  • Work as a Caja Gadget [2] [3]
[ edit ]

Testing

  • Runnable DOM Ready tests
  • Object.prototype tests
  • Integrate test suites from plugins into jQuery test suite
[ edit ]

Misc

你可能感兴趣的:(jquery,json,Ajax,css,IE)