Skip to content

Instantly share code, notes, and snippets.

@japanetfutan
Created March 26, 2018 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save japanetfutan/73259b8979db7b4f12c28639af011f0d to your computer and use it in GitHub Desktop.
Save japanetfutan/73259b8979db7b4f12c28639af011f0d to your computer and use it in GitHub Desktop.
/*ロングタップ処理
* elm:タップするエレメント(css selector string)
* */
function long_tap(elm){
$(elm).onmousedown;
console.log('mouse down...');
setTimeout(function(){
// 800ミリ秒後にマウスを上げる
$(elm).onmouseup;
console.log('mouse up.');
},800);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment