Jquery 1.4 released, Happy 4th birthday jquery

Source: Internet
Author: User

Message from jquery Official Website
The latest jquery version 1.4, the most popular JavaScript/ajax Library, has been released, to present a big gift to the 14-day anniversary of the jquery project.

The compressed version of 1.4 is only 23 K, and the uncompressed version is 154 K. In addition, Google also provides copies on its own server, which can be directly referenced as part of the Google Ajax API.

Jquery 1.4 internally rewrites the code library and begins to establish some style specifications. The old core. js file is divided into attribute. JS,
CSS. JS, Data. JS, manipulation. JS,
Traversing. js and queue. js. The logical separation of CSS and attribute. And corrected the error of 207 old versions.

Main new features include:

1.Performance of common methods is greatly improved
. Most of the earlier functions are rewritten.

2.Easy-to-use setting functions
(Setter function ). Many easy-to-use setting functions are added to all objects.

3.Ajax improvements
. Many Ajax and JSON processing updates are introduced, including the serialization of HTML5 elements.

In addition, attribute(.attr( )) 、jquery( csscsscsscss () performance has been improved twice), special effects and events, Dom operations, and so on.

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

 

The following are official documents:

 

Jquery 1.4 roadmapfrom jquery JavaScript libraryjump to: navigation
, Search

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

Contents
  • 1
    Core
  • 2
    Dom
  • 3
    Selectors
  • 4
    Attributes/CSS
  • 5
    Data
  • 6
    Offset
  • 7
    Events
  • 8
    Ajax
  • 9
    Effects
  • 10
    Structure
  • 11
    Testing
  • 12
    Misc

 

[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 (wocould 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)

  • Forcefully remove html/head/body from HTML Injection
  • Handle HTML injection in XML documents (serialize a DOM then insert)
  • Use. outerhtml to cleanup after. Remove ()
  • Implement a. Extract ()/. Detach () method (remove the element from the Dom, leaves events and data intact) discussion 1
    , Discussion 2
  • . Not () shocould accept a function for filtering
  • . Filter () shocould accept an element, selector, or Array
  • . Index () (no arg) gives you the position of the element amongst its siblings
  • . Children () shocould be sorted in order
  • . After () shocould act like. Add () if the elements are disconnected.
  • . Before () shocould work similarly, as well.
[Edit
]

Selectors
  • Force document order for comma-separated queries. Discussion
    (In 1.3.2)
  • Use queryselectorall for element-rooted queries. Discussion
  • Piggy-back on a central data cache, if one exists.
  • "# Id p" shocould be as fast as $ ("# ID"). Find ("p ")
    (In 1.3.3)
[Edit
]

Attributes/CSS
  • Rewrite (reorganize and separate these two pieces of functionality) (reorganized and separated in 1.3.3)

    • Use only camelcase for styles
    • Related: Fix camelcase of animation styles
    • Why is math. Max used in height/width? Shocould be removed? (Needed: IE freaks out with negative numbers)
  • Deactivate Alpha filter in IE when set to 1.0
  • Get filter value from stylesheet for Alpha
  • Allowing a function as the "setter" argument for. CSS ()--
    Like we have in. ATTR () -- and maybe for. Val (),. html (), and. Text ()
    As well.
  • Allow retrieval of multiple attributes/styles using a space separated string
  • Enhance. toggleclass
    (In 1.3.3)
  • . Radioclass ()
  • Colspan
[Edit
]

Data
  • A way to copy all data from one element to another.
[Edit
]

Offset
  • Make offset and position a setter offset setter plugin
  • Faster Initialization
    (In 1.3.3)
  • Use parsefloat
    (In 1.3.3)
  • Boundingclientrect check
    (In 1.3.3)
[Edit
]

Events
  • Have . Load check for. Complete in IE (in case the file was already loaded and cached) Discussion
  • Add the mousewheel event to core
  • Adapt mouseenter/mouseleave to work with live
  • Multiple binding with namespaces
  • Event scoping Discussion
    Ticket
    (In jquery 1.3.3)
  • . Live ()
    • $ ("Foo", context). Live (...)
      (In 1.3.3, might have issues with closest method not respecting context though)
    • Implement. Live ("change") See also
    • Implement. Live ("Submit ")
    • Implement. Live ("Blur/focus ")
  • Do garbage collection Asynchronously
  • Events shoshould be stored as an array [1]
    (Also, need a ticket on chrome executing events out of order .)
  • IFRAME load event not possible discussion
[Edit
]

Ajax
  • Use json api if available to parse JSON. More Info
  • Remove type Cruft from $. Get
  • Add some extra simple arguments to $. Ajax.
 $.ajax(type, url, options);

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

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

  • Improved $. Param serialization
  • Dynamic Loading of stylesheets
  • Look at headers to make intelligent decisions about the Content-Type
[Edit
]

Effects
  • Synchronized animations
    (Sync multiple Animations together)
  • Fadeto show also show the element, if it's hidden.
    (In 1.3.3)
  • Animate to end value of 'auto'
[Edit
]

Structure
  • Reduce the number of functions callneeded for common jquery Methods
  • Split up jquery structure into smaller modules (core, traversing, manipulation, attributes/CSS)
    • This was done in r6283
      (For 1.3.3), although there are some dependency issues
      To work out
  • Make it possible to only load the core module and be able to load all the rest dynamically
    • Seems like this wocould force us to expose a lot of the private
      Methods/properties we have right now and potentially ditch the use of
      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
  • Work on the jquery core style guidelines
  • Make sure that we pass spidermonkey/rhino strict
  • Include that check into the Build Process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.