Zepto.js, the semicolon-free edition! That’s right, we removed all trailing semicolons from the source and tests. They were never needed anyway.
Completely new documentation site
We’ve relaunched the ZeptoJS.com website to be a single-page documentation site—it works great on desktop browsers and as a home screen bookmark on iPads.
- “selector.js” with experimental support for jQuery CSS pseudo-selectors such as
Improvements in core:
- added missing methods for Ember.js compatibility
- improved creating DOM fragments from HTML with $()
- enable append & family to accept multiple arguments
- fix $.each context
- fix calling get without index
- fix calling val on empty collection
css(property, '')removes the property
- fix filter, is, and closest when operating on nodes that are detached from the document
andSelffrom core to the new “stack.js” plugin
- exposed important internal Zepto functions through the
extending or overriding Zepto functionality.
- data method returns undefined when there is no data
- support camelized names in data method
Apart from improving the basic
data method in core, the “data.js” module got improvements as well:
- better jQuery compatibility
- ability to store functions
- have correct ajaxComplete argument order for JSONP abort and timeout
- JSONP requests that hit a 404 will now correctly invoke the error callback
- add support for
dataType: 'jsonp'in $.ajax
- add support for
- HTTP 304 status is treated as success instead of an error
- made load more compatible with jQuery
- allow Content-Type to be set via request headers
- respect Content-Type of the response if
- work around Chrome CORS bug when data is empty
Changes in other modules:
- fix animate for edge cases such as when there is an animation within an animated element, and improve handling of transition CSS properties
- new “singleTap” event
- improved “longTap” detection
We also have some more examples in the main repository, plus a completely new README describing how to build, customize and contribute to Zepto; plus fully automated testing using PhantomJS.
The complete diff is here.
Please do report any bugs with v1.0rc1 on the issue tracker.