Skip to content

Commit

Permalink
Added swipeUp and swipeDown to test pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodubas committed Apr 6, 2011
1 parent c6c2a2a commit fbcefc2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/touch_functional.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ <h1>Zepto touch functional test</h1>
</div>

<script>
$('body').bind('touchmove', function (e) {e.preventDefault();} );
$('#touch_test')
.tap(function(){
$(this).append(' | tap!');
Expand All @@ -32,6 +33,12 @@ <h1>Zepto touch functional test</h1>
})
.swipeRight(function(){
$(this).append(' | swipe right!');
})
.swipeUp(function(){
$(this).append(' | swipe up!');
})
.swipeDown(function(){
$(this).append(' | swipe down!');
});
</script>
</body>
Expand Down
8 changes: 8 additions & 0 deletions test/touchcancel_functional.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ <h1>Zepto touch functional test</h1>

<script>
setTimeout(function () {alert("Alert! Now tap again, you should see a tap!, not a double tap!");}, 3000);
$('body').bind('touchmove', function (e) {e.preventDefault();} );
$('#touch_test')
.tap(function(){
$(this).append(' | tap!');
Expand All @@ -34,7 +35,14 @@ <h1>Zepto touch functional test</h1>
})
.swipeRight(function(){
$(this).append(' | swipe right!');
})
.swipeUp(function(){
$(this).append(' | swipe up!');
})
.swipeDown(function(){
$(this).append(' | swipe down!');
});

</script>
</body>
</html>

0 comments on commit fbcefc2

Please sign in to comment.