Skip to content
/ zepto Public
forked from madrobby/zepto

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

Notifications You must be signed in to change notification settings

gwak/zepto

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published