Javascript/jqueryライブラリ/touchSwipe.js
提供: 初心者エンジニアの簡易メモ
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>