下载此文档

HTML5移动应用左右滑动touchmovetouchmovetouchend实例.docx


文档分类:IT计算机 | 页数:约4页 举报非法文档有奖
1/4
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/4 下载此文档
文档列表 文档介绍
34}
35})
HTML5移动应用左右滑动touchmovetouchmovetouchend实例
Postedon2013-09-1116:51世纪老妖阅读(19072)评论(】)编辑收藏dl
也是刚开始接触移动前端,大虾别34}
35})
HTML5移动应用左右滑动touchmovetouchmovetouchend实例
Postedon2013-09-1116:51世纪老妖阅读(19072)评论(】)编辑收藏dl
也是刚开始接触移动前端,大虾别喷
1<!DOCTYPEHTML〉
2<html>
3<head>
<metaname="viewport"content="width=device-width,initial-scale=,maximum-scale=,user-scalable=O;"/>
5
10
11
<title>HTML5测试</title>
<scriptsrc="/Content/JS/jquery-"type="text/javascript"></script>
<scripttype="text/javascript">
$(function(){
varstartX,startY,endX,endY;
varshowADID=1;
("divADBox").addEventListener("touchstart",
touchStart,false);
("divADBox").addEventListener("touchmove",touchMove,false);
("divADBox").addEventListener("touchend",touchEnd,false);
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
functiontouchStart(event){
vartouch=[O];
startY=;
startX=;
}
functiontouchMove(event){
vartouch=[O];
//endY=(startY-);endX=;
}
functiontouchEnd(event){
$("#imgO"+showADID).hide();showADID++;
if(showADID>4){
showADID=1;
}
if((startX-endX)>100){
$("#img0"+showADID).show();
}
$(”#spText”).html(”X轴移动大小:"+(startX-endX));
34}
35})

HTML5移动应用左右滑动touchmovetouchmovetouchend实例 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息