Skip to content

Releases: madrobby/zepto

Zepto.js 1.2.0

13 Jul 21:14
Compare
Choose a tag to compare

On top of all the bug fixes found in v1.1.7, this release also brings new features and some slightly backwards-incompatible changes made to ensure better parity with jQuery.

Large changes:

  • Eliminate __proto__ use from codebase.
  • Enable AMD-compatible module output. Zepto and $ are still exported to global namespace, even in the case of module loader, to keep compatibility with plugins.

New functionality:

  • Add $.noop
  • Add fn.removeProp()
  • Add $.isNumeric()
  • Add dataFilter ajax option
  • Provide $.data() & $.hasData() in optional "data" module
  • Add Firefox OS detection

jQuery compatibility:

  • Stop falling back to reading properties in fn.attr()
  • fn.attr() now returns undefined for non-existing properties instead of null
  • Add document fragment/shadow DOM support

Zepto.js 1.1.7

13 Jul 20:47
Compare
Choose a tag to compare

DOM:

  • Fix fn.closest() on collections of multiple elements
  • text() returns text from all matching selectors
  • Fix offset() on documentElement
  • Use the standard API for CSS selector matches
  • append() now accepts array of DOM nodes
  • Add multi-window support for embedded scripts
  • Fix css() batch setting on non-existing element
  • Convert null/undefined into "" in fn.val() for jQuery compatibility
  • Improve detection of array-like objects

Ajax:

  • Fix appending ajax params to URLs that have a hash component
  • Add ajax support for receiving binary data
  • Sufficiently randomize JSONP callback names
  • Fix assigning query params from data with explicit JSONP

Cross-browser:

  • Avoid IE10 error by checking if element is in the DOM before calling getBoundingClientRect
  • Added support for pseudo-elements in IE getComputedStyle shim
  • Fix use of ajax xhrFields on Android 2.3 and Windows Mobile
  • Fx: avoid using vendor prefixes if unprefixed is supported

Misc.:

  • Fix dasherize bug in fx module
  • Fix swipe event of touch module
  • Avoid exception in doubleTap
  • Accept function as data for on event handler
  • Populate event.timeStamp if it's 0 or missing

Zepto.js 1.1.6

12 Dec 02:21
Compare
Choose a tag to compare
  • Fix crossDomain detection in $.ajax with regard to IE's treatment of port numbers

Zepto.js 1.1.5

11 Dec 14:37
Compare
Choose a tag to compare

Many serialization improvements:

  • Don't serialize form fields without a name attribute
  • Don't try to serialize <input type=file>
  • Fix serializing <select multiple> values
  • Fix serialize()/serializeArray() on empty Zepto collections
  • Serialize null values as empty strings in $.param()
  • Support functions as values in $.param()
  • Only deserialize number from data-* attributes if that doesn't change its string representation

Other fixes:

  • Improve detection of whether an $.ajax request is crossDomain or not
  • Fix find(falsey) to return an empty Zepto collection instead of an empty Array
  • Fix css() on empty Zepto collection causing exceptions when "ie" module is not included
  • Ensure that $.animate completion callback doesn't fire prematurely if the animation is configured with a delay
  • Actually focus() & blur() elements when these events are manually triggered
  • Fix installing auto-cancelling event handlers with shorthands such as submit(false), click(false)
  • Prevent removeClass/addClass from affecting window objects
  • Enable removeAttr to remove space separated list
  • Ensure recognition of Safari on Windows

Zepto.js 1.1.4

07 Jul 12:08
Compare
Choose a tag to compare
  • Detect IE 11, Windows Phone, Safari on OS X
  • .find() with falsy values now returns an empty array
  • Fix how .attr('value') and .val() interact on <input> (#939)
  • Have .text() accept a function argument
  • Make .text(undefined) assign an empty string
  • Do not eval <script> tags if parent element is not in the DOM
  • Second argument to .attr/prop/data() is always a setter, even if undefined
  • $.proxy() now accepts additional arguments
  • $.ajax() uses HTTP cache-busting parameter for dataType: jsonp/script by default
  • Fix $.contains and related features on Firefox 4 – 8.0

Zepto 1.1.3

12 Feb 00:49
Compare
Choose a tag to compare
  • Fix automatic parsing of JSON responses in $.get/post
  • Don't falsely detect requests to URLs such as /foo=?a=b to be JSONP requests; the = is part of the request path in this case
  • Use native Array.isArray if available
  • Update to Uglify v2, saving ~1.6 kB in minified version

✨ 🌟 Download Zepto.js 🌟 ✨

Zepto 1.1.2

13 Dec 00:35
Compare
Choose a tag to compare
  • Enabled xhr.setRequestHeader() in beforeSend Ajax handler

Zepto 1.1.1

13 Jul 11:06
Compare
Choose a tag to compare
  • Make sure to properly patch the Zepto object in IE, not any global $ object.

Zepto 1.1

05 Dec 14:11
Compare
Choose a tag to compare

Notable changes

  • IE10+ support
  • Huge speed optimizations for simple CSS selectors (classname, ID) and DOM element creation
  • Provide $.Callbacks and $.Deferred in optional modules
  • Removed fx and detect modules from default build

Download Zepto.js:

Ajax

  • New supported $.ajax() options:
    • xhrFields
    • mimeType
    • jsonpCallback
    • username & password
  • Promise interface supported when loading the optional "callbacks" and "deferred" modules:
    • xhr.done(function(data, status, xhr){ ... })
    • xhr.fail(function(xhr, errorType, error){ ... })
    • xhr.always(function(){ ... })
  • Enable mutating Ajax settings in the beforeSend callback
  • Fix JSONP callbacks for errored responses on Android
  • Ensure consistent Accept request HTTP header across browsers
  • Fix $.param() for jQuery compatibility when handling complex nested objects
  • Support IIS JavaScript MIME type
  • Pass "abort" and "timeout" status to global ajaxError event handlers

Event

  • Provide isDefaultPrevented(), stopImmediatePropagation(), and related methods for all events
  • Support the data argument in .bind(), .on(), and .one()
  • Support CSS selector argument in .one() for event delegation
  • Support .on('ready') as an alias for .ready()
  • Enable event handlers on plain old JS objects
  • Many fixes related to event delegation

Data

  • Cleanup .data() values on DOM element removal with .remove/empty()
  • .data() now assumes that numbers that begin with zeroes are strings
  • .removeData() (no argument) now removes all data on the element
  • Enable reading data-* attributes that have underscores in the name

Misc.

  • Support simple DOM property names in .prop(name) such as for, class, readonly
  • Implement the .scrollLeft([value]) method
  • Support setting .scrollTop(value)
  • Fix $(document).width/height()
  • Support fetching multiple CSS values via array in .css(['prop1', 'prop2', ...])
  • Support setting CSS transition delay via delay option for .animate()
  • Ensure that .animate() callback always fires

Zepto 1.0.0

13 Jul 11:07
Compare
Choose a tag to compare

Party like it's one-oh!

Notable changes

  • Zepto is now compatible with Twitter Bootstrap
  • Portable, completely new node.js-based build system
  • Fully automated tests with PhantomJS and Travis CI
  • Removed touch module from default distribution

New features

  • $.fn.filter(function(index){ ... })
  • $.fn.contents()
  • $.fn.wrapInner()
  • $.fn.scrollTop()
  • $.contains()
  • $.fn.has()
  • $.fn.position()
  • $.fn.offsetParent()
  • $.parseJSON()
  • $.camelCase()
  • $.isWindow()
  • $.grep() (interface to Array.filter)
  • Support $(html, attributes) syntax for element creation
  • Emulate mouseenter and mouseleave events
  • Bootstrap compat: support $.fn.offset(coordinates)
  • Bootstrap compat: implement $.fn.detach()
  • Add support for Ajax cache: false option
  • Prevent scrolling when horizontal swipe events are detected
  • cancelTouch for tap events
  • prev and next now support an optional selector argument
  • $.fn.find and $.fn.closest now support Zepto objects as arguments
  • Enable deep copy via $.extend(true, target, source)
  • Enable nested structures for $.fn.wrap() and $.fn.wrapAll()
  • Enable function arguments for $.fn.wrap() and $.fn.wrapInner()
  • Support number, boolean, JSON types in data attributes
  • Support manipulating classnames on SVG elements
  • Enable named durations for animate, e.g. slow.
  • Support timing-function for animate
  • Support event properties passed to $.fn.trigger() or $.Event()
  • Selector module: support child > * queries
  • Add detect support for mobile Chrome browser
  • Add $.os.phone and $.os.tablet (booleans)
  • Detect Firefox mobile, Playbooks and BB10

Fixes

  • Fix passing null selector to on or off
  • Fixed bug where self-closing html tags would act as open tags
  • Fix val for multiple select
  • Fix various touch and gesture bugs.
  • Corrected parameters of load success callback to match jQuery.
  • Fix css with 0 values and falsy values
  • Fix a css performance issues with string values
  • Fix $.ajaxJSONP when invoked directly
  • Fix animate with 0 durations.
  • Fix toggle and fadeToggle for multiple elements.
  • Fix ajax $.fn.load behavior with selector
  • Make attr(name, null) unset attribute
  • Fix animate in Firefox
  • Fix animate for elements just added to DOM
  • Fix an escaping issue with $.param
  • Respect traditional: true option in $.ajax
  • Fix focus & blur event delegation and enable unbind
  • Simple wrapping for any object passed to $()
  • Enable children method for XML documents
  • Don't eval <script> content when src is present
  • Support processData option for $.ajax()
  • Enable passing contentType: false to $.ajax()
  • Apply focus() and blur() to all elements in collection
  • Change $.fn.map() to return a Zepto collection
  • Selector argument for on(evt, selector, fn) can be false
  • Don't raise error on $('#')
  • Provide empty object in $.support
  • return false in event handler calls stopPropagation()
  • Fix $.isPlainObject() for window in Opera
  • $.ajax error callback correctly reports abort status
  • Fix hasClass in collections of multiple elements
  • Stop iteration in each() when the callback returns false
  • Add ability to set xhr factory per-request
  • Have get() method accept negative index
  • Support for multiple class names in toggleClass()
  • Fix error callbacks for ajaxJSONP
  • Support optional data argument for various Ajax methods
  • Fix DOM insertion operators for null values
  • Fix dataType being set for $.getJSON