-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.html
33 lines (30 loc) · 963 Bytes
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>测试tap</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<script type="text/javascript" src="src/JSLite.min.js"></script>
<script type="text/javascript" src="src/touch.js"></script>
</head>
<body style="overflow:hidden">
我采用是的 <a href="https://github.com/JSLite/JSLite">https://github.com/JSLite/JSLite</a>
<div class="ces le" id="ces" >
<ul>
<li id="ontouch">点击我 我是 .on(tap) 方式</li>
<li>4</li>
<li id="mytap">点击我 我是 .tap() 方式</li>
</ul>
</div>
<script type="text/javascript">
$("#ontouch").on("tap",function(){
alert("我是 .on(tap) 方式");
$(this).css({width:"200px",height:"100px",border:"1px red solid"});
})
$("#mytap").tap(function(){
alert("我是 .tap() 方式");
$(this).css({width:"300px",height:"30px",border:"1px blue solid"});
})
</script>
</body>
</html>