Thomas Fuchs
Hi, I'm Thomas Fuchs. I'm the author of Zepto.js, of script.aculo.us, and I'm a Ruby on Rails core alumnus. With Amy Hoy I'm building cheerful software, like Freckle Time Tracking and Every Time Zone and write books like Retinafy.me.
   Want me to speak at your conference? Contact me!

Zepto.js v0.7 released

August 1st, 2011

Another great release of Zepto.js is ready for your download pleasure! With tons of jQuery-compatible additions and recently optimized DOM manipulation methods, Zepto is close to running most existing jQuery plugins without problems. Zepto is now also largely compatible with Firefox, enabling its use in desktop as well as mobile web applications.

Zepto has grown to have 1,777 watchers, 185 forks on GitHub—now, for the first time, Zepto also has an official core team including Sasha Koss and Mislav Marohnić. These guys have worked hard around the board for this release addressing open issues and pull requests. Together we’re working to push Zepto towards the big v1.0!

Here is a summary of what’s new since v0.6.

Core

  • added $.each() method
  • added $.slice()
  • added $.map() and make $.fn.map() behave the same as jQuery’s
  • added end() method that switches back to previous context after Zepto methods that change the current context
  • added negative index support for eq()
  • detect HP TouchPad through $.os.touchpad

DOM

  • added $.fn.serializeArray() & $.fn.serialize()
  • support creating all table elements from strings, e.g. $(‘<tr>..</tr>’)
  • make width() & height() methods also setters (when called with an argument)
  • support toggle(bool) where bool indicates whether to force showing or hiding
  • support setting camelCased CSS properties
  • appendTo() and prependTo() now accept selector as parameter
  • execute embeded JavaScript in $.fn.html(), $.fn.append() and friends
  • various bugfixes and optimizations for append() and friends
  • index() without arguments now returns index of current element among its siblings
  • added $.fn.wrap(), wrapAll(), and unwrap()

Event

  • added $.Event() constructor
  • return false in event handlers now triggers preventDefault()
  • added “longTap” event (tap and hold for at least 750 ms)
  • added shortcut methods to bind event handlers, e.g. $(‘#el’).click(function(e){ … })
  • added $.fn.triggerHandler() method

Anim

  • support animating elements just added to the DOM
  • anim() now supports using transform properties among regular CSS properties
$('#myelem').anim({
  opacity: 0.5,
  scale: '0.8',
  rotateZ: '90deg',
  translate3d: '100px, 100px, 100px'
})

Keep in mind that animations are still limited to just WebKit browsers.

Again, thanks to our new core team and the growing number of our contributors.

Download Zepto.js v0.7 from the official website.