「Javascript/jqueryライブラリ/touchSwipe.js」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→ダウンロード&インストール) |
|||
(同じ利用者による、間の1版が非表示) | |||
行25: | 行25: | ||
</script> | </script> | ||
</head> | </head> | ||
− | <body id="test"> | + | <body id="test">ここをスワイプ</body> |
</html> | </html> | ||
+ | |||
+ | ==注意== | ||
+ | 入力box(inputタグ)が動作しなくなる |
2016年5月23日 (月) 23:14時点における最新版
touchSwipeとは
jqueryのドロワータッチ対応ライブラリ
公式ページ
http://labs.rampinteractive.co.uk/touchSwipe/demos/index.html
ダウンロード&インストール
wget https://github.com/mattbryson/TouchSwipe-Jquery-Plugin/archive/master.zip unzip master
動作サンプル
<html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript" src="/assets/js/TouchSwipe-Jquery-Plugin-master/jquery.touchSwipe.min.js"></script> <script> $(function() { $("#test").swipe( { swipe:function(event, direction, distance, duration, fingerCount, fingerData) { $(this).text("You swiped " + direction );-- } }); $("#test").swipe( {fingers:2} ); }); </script> </head> <body id="test">ここをスワイプ</body> </html>
注意
入力box(inputタグ)が動作しなくなる