forked from madrobby/zepto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
47 lines (30 loc) · 1.3 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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!