├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── MIT-LICENSE
├── README.md
├── examples
├── anim.html
├── iphone
│ ├── index.html
│ └── iphone.css
├── load_jquery_on_ie.html
├── snow
│ └── index.html
└── touch_events.html
├── make
├── package.json
├── script
├── guard
└── test
├── src
├── ajax.js
├── assets.js
├── data.js
├── detect.js
├── event.js
├── form.js
├── fx.js
├── fx_methods.js
├── gesture.js
├── polyfill.js
├── selector.js
├── stack.js
├── touch.js
└── zepto.js
├── test
├── ajax.html
├── assets_functional.html
├── data.html
├── detect.html
├── event.html
├── evidence_runner.js
├── fixtures
│ ├── ajax_load_selector.html
│ ├── ajax_load_selector_javascript.html
│ ├── ajax_load_simple.html
│ ├── iframe_document.html
│ └── zepto.json
├── form.html
├── fx.html
├── fx_functional.html
├── gesture_functional.html
├── polyfill.html
├── runner.coffee
├── selector.html
├── server.coffee
├── stack.html
├── test.css
├── touch.html
├── touch_functional.html
├── touchcancel_functional.html
└── zepto.html
└── vendor
└── evidence.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | dist/
3 | dist/zepto.min.js
4 | dist/zepto.js
5 | pkg
6 | *.swp
7 | docs/*
8 | .jhw-cache
9 | .rbenv-version
10 | public/
11 | node_modules
12 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.6
4 | script: script/test
5 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Code style guidelines
2 |
3 | * `function name() { }` for named functions
4 | * `function(){ }` for anonymous functions
5 | * No curly braces for single-line control flow statements such as `if` & friends
6 | * Don't write [semicolons that are optional][optional]
7 | * Put a single semicolon _before_ statements that start with `(` or `[`
8 | (see above article as for why it's needed)
9 | * Use long, descriptive variable and method names
10 | * Use blank lines to separate "paragraphs" of code for readability
11 | * Use comments to describe non-obvious code behavior
12 |
13 |
14 | [optional]: http://mislav.uniqpath.com/2010/05/semicolons/
15 |
--------------------------------------------------------------------------------
/MIT-LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010-2012 Thomas Fuchs
2 | http://zeptojs.com/
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining
5 | a copy of this software and associated documentation files (the
6 | "Software"), to deal in the Software without restriction, including
7 | without limitation the rights to use, copy, modify, merge, publish,
8 | distribute, sublicense, and/or sell copies of the Software, and to
9 | permit persons to whom the Software is furnished to do so, subject to
10 | the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Zepto.js – a minimalist JavaScript library
2 |
3 | Zepto is a minimalist JavaScript library for modern browsers with a
4 | largely jQuery-compatible API. If you use jQuery, you already know how to use Zepto.
5 |
6 | See [zeptojs.com][] for an extended introduction, downloads
7 | and documentation.
8 |
9 | Zepto.js is licensed under the terms of the MIT License.
10 |
11 | ## Building
12 |
13 | [](http://travis-ci.org/madrobby/zepto)
14 |
15 | The official site offers a download of the default distribution of Zepto. This
16 | is good for starting out. However, at some point you might want to add some
17 | optional modules and remove some of the default ones you don't need, to keep the
18 | size at minimum. That's when you need to check out Zepto's source code and use
19 | the build commands.
20 |
21 | You will need Node.js installed on your system.
22 |
23 | ~~~ sh
24 | $ npm install
25 | $ npm run-script dist
26 | ~~~
27 |
28 | The resulting files are:
29 |
30 | 1. `dist/zepto.js`
31 | 2. `dist/zepto.min.js`
32 |
33 | If you install CoffeeScript globally, you can run `make` directly:
34 |
35 | ~~~ sh
36 | $ coffee make dist
37 | $ MODULES="zepto event data ..." ./make dist
38 | ~~~
39 |
40 | ## Zepto modules
41 |
42 | Zepto modules are individual files in the "src/" directory.
43 |
44 |
141 |
142 | ## Contributing
143 |
144 | Get in touch:
145 |
146 | * IRC channel: [#zepto on freenode.net](irc://irc.freenode.net/zepto)
147 | * @[zeptojs](http://twitter.com/zeptojs)
148 |
149 | ### Write documentation
150 |
151 | Zepto docs are written in Markdown and live in the ["gh-pages" branch][docs].
152 | They are published on [zeptojs.com][].
153 |
154 | You can use GitHub's web interface to make quick changes to documentation for
155 | specific Zepto features
156 | ([example: ajaxSettings](https://github.com/madrobby/zepto/blob/gh-pages/ajax/_posts/1900-01-01-Z-ajaxSettings.md)).
157 | This will submit a pull request to us that we can review.
158 |
159 | ### Report a bug
160 |
161 | 1. Check if the bug is already fixed in the [master branch][master] since the
162 | last release.
163 | 2. Check [existing issues][issues]. Open a new one, including exact browser &
164 | platform information. For better formatting of your report, see
165 | [GitHub-flavored Markdown][mkd].
166 |
167 | ### Running tests
168 |
169 | You will need to install [PhantomJS][]. On OS X, that's easy:
170 |
171 | ~~~ sh
172 | $ brew install phantomjs
173 | ~~~
174 |
175 | To run the test suite, these are all equivalent:
176 |
177 | ~~~ sh
178 | $ npm test
179 | $ ./make test
180 | $ script/test
181 | ~~~
182 |
183 |
184 | [zeptojs.com]: http://zeptojs.com
185 | [master]: https://github.com/madrobby/zepto/commits/master
186 | [issues]: https://github.com/madrobby/zepto/issues
187 | [docs]: https://github.com/madrobby/zepto/tree/gh-pages#readme
188 | [mkd]: http://github.github.com/github-flavored-markdown/
189 | [evidence.js]: https://github.com/tobie/Evidence
190 | [phantomjs]: http://code.google.com/p/phantomjs/wiki/Installation
191 |
--------------------------------------------------------------------------------
/examples/anim.html:
--------------------------------------------------------------------------------
1 |
When you run this test without the assets plugin, Mobile Safari will stop loading after on average 8 images (that's on the iPad with 1 MB images). It might also crash.
35 |
PLEASE NOTE: You must restart Safari between runs (click the home button to return to the home screen, double-click the home button, tap-and-hold the Safari icon, then tap the minus badge).