手持上click事件的响应速度远远不如touchstart。但是仅仅写touch事件很不方便web端开发测试,所以下边的判断很有必要。###
<pre>
var isSupportTouch = "ontouchend" in document ? true : false,
touchEv = isSupportTouch ? 'touchstart' : 'mousedown',
touchEndEv = isSupportTouch ? "touchend" : 'mouseup';
</pre>
另外:
<pre>
var isSupportTouch = "ontouchend" in document ? true : false,
touchEv = isSupportTouch ? 'touchstart' : 'click';
</pre>
用起来就很方便啦
<pre>
$obj.on(touchEv,function(){
\事件
});
</pre>