Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
zepto.js is a minimalist inlinable framework for mobile WebKit browsers, with a jQuery-like chaining syntax
branch: master

This branch is 1369 commits behind madrobby:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
test
.gitignore
MIT-LICENSE
README
zepto.js

README

zepto.js is a minimalist inlinable framework for mobile WebKit browsers,
with a jQuery-like chaining syntax

The ultimate goal is to have a ~2k library that handles most basic dredge work for you in a nice API so you can concentrate on getting stuff done. 

Primary target platforms are:

* iOS 4+
* Android 2.2+
* webOS 1.4.5+

Secondary platforms are:

* Safari 5+ (desktop)
* Chrome 5+ (desktop)

Syntax & features:

Basic call:
   
  $('some css selector').html('set contents').css('set styles');

Supported element functions:

  get(): return array of all elements found
  get(0): return first element found
  html('new html'): set the contents of the element(s)
  css('css properties'): set styles of the element(s)
  append, prepend, before, after: like html, but add html to element contents (or before and after)
  anim(transform, opacity, duration):
    use -webkit-transform/opacity and do an animation
  
Event handlers ("live" events):

  $('some selector').live('touchstart', function(event){ alert("I'm touched!") });
    
Ajax:

  $.get(url, callback)
  $.post(url, callback)
  $.getJSON(url, callback)

Best used if you stick in the contents of zepto.min.js into a <script> tag in your HTML (no need to load it form an external file).

I'd love some help on this, so please feel free to mess around!

Have fun!
Something went wrong with that request. Please try again.