Skip to content

Instantly share code, notes, and snippets.

Created February 9, 2021 07:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
【jQuery】テーブル Tr 行を動的に追加・削除・並び替え・値を取得する方法 - スマホ対応
function simulateMouseEvent (event, simulatedType) {
// Ignore multi-touch events
if (event.originalEvent.touches.length > 1) {
var touch = event.originalEvent.changedTouches[0],
simulatedEvent = document.createEvent('MouseEvents');
if ($('input') || $('textarea')) {
} else {
// Initialize the simulated mouse event using the touch event's coordinates
simulatedType, // type
true, // bubbles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment