I recently saw an article introducing a new js framework called zepto.js, which is suitable for mobile devices, desktop browsers in addition to IE series. .
It is compatible with jquery's API, so it's not difficult to learn or use. His advantage over jquery is
1. He is small enough, only about 21k. . All functions.
2. Added touch and other events on mobile devices, and there is no need to introduce other mobile frameworks such as jquery mobile again.
3. Although it is incompatible, it provides a compatible method:
The code copy is as follows:
<script>
document.write('<script src=' +
('__proto__' in {} ? 'zepto' : 'jquery') +
'.js><//script>')
</script>
Because it is compatible with the jquery API, there is no need to worry about the event that will be invalid after citing jquery on ie, except for touch, etc. .
Desktop browser:
1.Safari 5+ (Mac, Win)
2. Chrome 5+ (Win, Mac, Linux, Chrome OS)
3.Mozilla Firefox 4+ (Win, Mac, Linux)
4. Opera 10+ (Win, Mac, Linux)
Mobile browser:
1.iOS 4+ Safari
2. Chrome for Android
3. Chrome for iOS
4. Android 2.2+ Browser
5.webOS 1.4.5+ Browser
6.BlackBerry Tablet OS 1.0.7+ Browser
7. Amazon Silk 1.0+
8.Firefox for Android
9.Firefox OS Browser
10.Practically any WebKit-based browsers/runtimes
Judging from today's framework, it is the preferred framework for developing mobile device web. . . . If you are interested, please check out github: https://github.com/madrobby/
zepto official website: http://zeptojs.com