{"id":13398585,"url":"https://github.com/madrobby/zepto","last_synced_at":"2025-05-12T05:21:04.025Z","repository":{"id":37663837,"uuid":"924303","full_name":"madrobby/zepto","owner":"madrobby","description":"Zepto.js is a minimalist JavaScript library for modern browsers, with a jQuery-compatible API","archived":false,"fork":false,"pushed_at":"2022-09-19T09:37:10.000Z","size":8242,"stargazers_count":15017,"open_issues_count":72,"forks_count":3892,"subscribers_count":555,"default_branch":"main","last_synced_at":"2025-05-11T13:16:25.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://zeptojs.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madrobby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-09-20T07:57:57.000Z","updated_at":"2025-05-11T10:13:11.000Z","dependencies_parsed_at":"2022-07-12T16:42:34.550Z","dependency_job_id":null,"html_url":"https://github.com/madrobby/zepto","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madrobby%2Fzepto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madrobby%2Fzepto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madrobby%2Fzepto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madrobby%2Fzepto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madrobby","download_url":"https://codeload.github.com/madrobby/zepto/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253568726,"owners_count":21928911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:00:28.908Z","updated_at":"2025-05-12T05:21:03.983Z","avatar_url":"https://github.com/madrobby.png","language":"HTML","funding_links":[],"categories":["HTML","Web 前端","目录","others","2. JavaScript 框架汇总"],"sub_categories":["移动端"],"readme":"# Zepto.js – a minimalist JavaScript library\n\nZepto is a minimalist JavaScript library for modern browsers with a\nlargely jQuery-compatible API. If you use jQuery, you already know how to use Zepto.\n\nSee [zeptojs.com][] for an extended introduction, downloads\nand documentation.\n\nZepto.js is licensed under the terms of the MIT License.\n\nWant to give us money or a tip? Don't.\nInstead please donate to [charity: water](http://charitywater.org/).\n\n## Building\n\n[![Build Status](https://secure.travis-ci.org/madrobby/zepto.svg?branch=master)](http://travis-ci.org/madrobby/zepto)\n\nThe official site offers a download of the default distribution of Zepto. This\nis good for starting out. However, at some point you might want to add some\noptional modules and remove some of the default ones you don't need, to keep the\nsize at a minimum. That's when you need to check out Zepto's source code and use\nthe build commands.\n\nYou will need Node.js installed on your system.\n\n~~~ sh\n$ npm install\n$ npm run-script dist\n\n# do a custom build\n$ MODULES=\"zepto event data\" npm run-script dist\n\n# on Windows\nc:\\zepto\u003e SET MODULES=zepto event data\nc:\\zepto\u003e npm run-script dist\n~~~\n\nThe resulting files are:\n\n1. `dist/zepto.js`\n2. `dist/zepto.min.js`\n\nIf you install CoffeeScript globally, you can run `make` directly:\n\n~~~ sh\n# one-time operation\n$ npm install coffee-script --global\n\n$ coffee make dist\n$ MODULES=\"zepto event data ...\" ./make dist\n\n# on Windows\nc:\\zepto\u003e SET MODULES=zepto event data\nc:\\zepto\u003e coffee make dist\n~~~\n\n## Zepto modules\n\nZepto modules are individual files in the \"src/\" directory.\n\n\u003ctable\u003e\n\u003cthead\u003e\u003ctr\u003e\n  \u003cth\u003emodule\u003c/th\u003e \u003cth\u003edefault\u003c/th\u003e \u003cth\u003edescription\u003c/th\u003e\n\u003c/tr\u003e\u003c/thead\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/zepto.js#files\"\u003ezepto\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e✔\u003c/td\u003e\n    \u003ctd\u003eCore module; contains most methods\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/event.js#files\"\u003eevent\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e✔\u003c/td\u003e\n    \u003ctd\u003eEvent handling via \u003ccode\u003eon()\u003c/code\u003e \u0026amp; \u003ccode\u003eoff()\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/ajax.js#files\"\u003eajax\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e✔\u003c/td\u003e\n    \u003ctd\u003eXMLHttpRequest and JSONP functionality\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/form.js#files\"\u003eform\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e✔\u003c/td\u003e\n    \u003ctd\u003eSerialize \u0026amp; submit web forms\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/ie.js#files\"\u003eie\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e✔\u003c/td\u003e\n    \u003ctd\u003eSupport for Internet Explorer 10+ on the desktop and Windows Phone 8\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/detect.js#files\"\u003edetect\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003eProvides \u003ccode\u003e$.os\u003c/code\u003e and \u003ccode\u003e$.browser\u003c/code\u003e information\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/fx.js#files\"\u003efx\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003eThe \u003ccode\u003eanimate()\u003c/code\u003e method\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/fx_methods.js#files\"\u003efx_methods\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      Animated \u003ccode\u003eshow\u003c/code\u003e, \u003ccode\u003ehide\u003c/code\u003e, \u003ccode\u003etoggle\u003c/code\u003e,\n      and \u003ccode\u003efade*()\u003c/code\u003e methods.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/assets.js#files\"\u003eassets\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      Experimental support for cleaning up iOS memory after removing\n      image elements from the DOM.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/data.js#files\"\u003edata\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      A full-blown \u003ccode\u003edata()\u003c/code\u003e method, capable of storing arbitrary\n      objects in memory.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/deferred.js#files\"\u003edeferred\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      Provides \u003ccode\u003e$.Deferred\u003c/code\u003e promises API.\n      Depends on the \"callbacks\" module.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/callbacks.js#files\"\u003ecallbacks\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      Provides \u003ccode\u003e$.Callbacks\u003c/code\u003e for use in \"deferred\" module.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/selector.js#files\"\u003eselector\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      Experimental \u003ca href=\"http://api.jquery.com/category/selectors/jquery-selector-extensions/\"\u003ejQuery\n      CSS extensions\u003c/a\u003e support for functionality such as \u003ccode\u003e$('div:first')\u003c/code\u003e and\n      \u003ccode\u003eel.is(':visible')\u003c/code\u003e.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/touch.js#files\"\u003etouch\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      Fires tap– and swipe–related events on touch devices. This works with both\n      `touch` (iOS, Android) and `pointer` events (Windows Phone).\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/gesture.js#files\"\u003egesture\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003eFires pinch gesture events on touch devices\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/stack.js#files\"\u003estack\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003eProvides \u003ccode\u003eandSelf\u003c/code\u003e \u0026amp; \u003ccode\u003eend()\u003c/code\u003e chaining methods\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003ca href=\"src/ios3.js#files\"\u003eios3\u003c/a\u003e\u003c/th\u003e\n    \u003ctd\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      String.prototype.trim and Array.prototype.reduce methods\n      (if they are missing) for compatibility with iOS 3.x.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n## Contributing\n\nPlease read our [contribution guidelines](https://github.com/madrobby/zepto/blob/master/CONTRIBUTING.md)\nfor information on how to contribute.\n\nGet in touch:\n\n* @[zeptojs](http://twitter.com/zeptojs)\n\n### Write documentation\n\nZepto docs are written in Markdown and live in the [\"gh-pages\" branch][docs].\nThey are published on [zeptojs.com][zeptojs.com].\n\nYou can use GitHub's web interface to make quick changes to documentation for\nspecific Zepto features\n([example: ajaxSettings](https://github.com/madrobby/zepto/blob/gh-pages/ajax/_posts/1900-01-01-Z-ajaxSettings.md)).\nThis will submit a pull request to us that we can review.\n\n### Report a bug\n\n1. Check if the bug is already fixed in the master branch since the last release.\n2. Check [existing issues][issues]. Open a new one, including exact browser \u0026\n   platform information. For better formatting of your report, see\n   [GitHub-flavored Markdown][mkd].\n\n### Running tests\n\nYou will need to install [PhantomJS][phantomjs]. On OS X, that's easy:\n\n~~~ sh\n$ brew install phantomjs\n~~~\n\nTo run the automated tests:\n\n~~~ sh\n$ npm test\n~~~\n\nTo run a test server, which you can hit with your browsers and devices:\n\n~~~ sh\n$ npm start\n~~~\n\nGo to `http://your-ip-address:3000/` on your browser and follow the\ninstructions. For your convenience test failures and exceptions will be\nreported to the the console you started the test server in (as well as\nthe browser console if available).\n\n  [zeptojs.com]: http://zeptojs.com\n  [issues]: https://github.com/madrobby/zepto/issues\n  [docs]: https://github.com/madrobby/zepto/tree/gh-pages#readme\n  [mkd]: https://help.github.com/articles/creating-and-highlighting-code-blocks/\n  [evidence.js]: https://github.com/tobie/Evidence\n  [phantomjs]: http://phantomjs.org/download.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadrobby%2Fzepto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadrobby%2Fzepto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadrobby%2Fzepto/lists"}