this.checked)) result.push({
name: el.attr('name'),
value: el.val()
})
})
return result
}
//将表单的值转成name1=value1&name2=value2的形式
$.fn.serialize = function() {
var result = []
this.serializeArray().forEach(function(elm) {
result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value))
})
return result.join('&')
}
//表单提交
$.fn.submit = function(callback) {
if (callback) this.bind('submit', callback)
else if (this.length) {
var event = $.Event('submit')
this.eq(0).trigger(event)
if (!event.defaultPrevented) this.get(0).submit()
}
return this
}
})(Zepto)
//CSS3动画
;
(function($, undefined) {
var prefix = '',
eventPrefix, endEventName, endAnimationName,
vendors = {
Webkit: 'webkit',
Moz: '',
O: 'o',
ms: 'MS'
},
document = window.document,
testEl = document.createElement('div'),
supportedTransforms = /^((translate
关键词:zepto是啥