エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
【jQuery】スマホ時のタップ・スワイプ処理の実装 - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
【jQuery】スマホ時のタップ・スワイプ処理の実装 - Qiita
<div id="wrap"> <div class="box">スワイプ削除</div> </div> <style> #wrap { position: relative; wi... <div id="wrap"> <div class="box">スワイプ削除</div> </div> <style> #wrap { position: relative; width: 100%; max-width: 318px; } .box { position: absolute; top: 0; left: 0; width: 60px; background-color: #ccc; } </style> var swWrap = $('#wrap'); var sw = swWrap.children('.box'); sw.bind({ 'touchstart': function(e) { e.preventDefault(); // スワイプした距離を保存(※スワイプした距離を固定する) this.pageX = e.originalEvent.touches[0