Zepto清单

Zepto清单

模块建议描述
zepto

Core module; contains most methods

核心模块,包含初始化Zepto对象的实现,以及dom选择器、css属性操作、dom属性操作

event

Event handling via on() & off()

Zepto事件处理库,包含整个dom事件的实现

ajax

XMLHttpRequest and JSONP functionality

Zepto ajax模块的实现

form  

Serialize & submit web forms

form表单相关实现,可以删去,移动端来说意义不大

ie

Support for Internet Explorer 10+ on the desktop and Windows Phone 8

这个便是为上面那段实现还账的,几行代码将方法属性扩展至dom集合上(所以标准浏览器返回的是一个实例,ie返回的是一个加工后的数组)

detect  ✔

Provides $.os and $.browser information

设备判断,检测当前设备以及浏览器型号

fx  ✔

The animate() method

animate方法,这里叫fx模块有点让人摸不着头脑

fx_methods  

Animated showhidetoggle, and fade*() methods.

一些jQuery有的方法,Zepto没有的,这里做修复,比如fadeIn fadeOut意义不大

assets  

Experimental support for cleaning up iOS memory after removing image elements from the DOM.

没有实际使用过,具体用处不明

data  

A full-blown data() method, capable of storing arbitrary objects in memory.

数据存储模块

deferred  

Provides $.Deferred promises API. Depends on the "callbacks" module.

神奇的deferred模块,语法糖,为解决回调嵌套而生

callbacks  

Provides $.Callbacks for use in "deferred" module.

服务于deferred,实际未使用过

selector   ✔

Experimental jQuery CSS extensions support for functionality such as$('div:first') and el.is(':visible').

扩展选择器,一些语法糖

touch  X

Fires tap– and swipe–related events on touch devices. This works with both `touch` (iOS, Android) and `pointer` events (Windows Phone).

提供简单手势库,这个大坑,谁用谁知道!!!几个有问题的地方:

① 事件直接绑定至document,性能浪费

② touchend时候使用settimeOut导致event参数无效,所以preventDefault无效,点透等情况也会发生

gesture  

Fires pinch gesture events on touch devices

对原生手势操作的封装

stack  

Provides andSelf & end() chaining methods

语法糖,链式操作

ios3  

String.prototype.trim and Array.prototype.reduce methods (if they are missing) for compatibility with iOS 3.x.

没有用过

真实项目时,完全可以按照需要选取模块即可

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值