jQuery touch action Ex

簡単なタッチ操作のイベントを追加します

Versión del día 08/01/2021. Echa un vistazo a la versión más reciente.

Este script no debería instalarse directamente. Es una biblioteca que utilizan otros scripts mediante la meta-directiva de inclusión // @require https://update.greasyforks.org/scripts/419065/888669/jQuery%20touch%20action%20Ex.js

// ==UserScript==
// @name         jQuery touch action Ex
// @version      0.2
// @description  簡単なタッチ操作のイベントを追加します
// @author       y_kahou
// ==/UserScript==

if (window.jQuery) (function($) {
    'use strict';
    
    $.fn.tap = function(interval = 200) {
        addTap(this[0], {interval: interval})
        return $(this)
    }
    $.fn.doubletap = function(interval = 200) {
        addDoubletap(this[0], {interval: interval})
        return $(this)
    }
    $.fn.swipe = function(min_dist = 50) {
        addSwipe(this[0], {min_dist: min_dist})
        return $(this)
    }
    $.fn.swipe_way = function(range = 90, min_dist = 50) {
        addSwipeWay(this[0], {range: range, min_dist: min_dist})
        return $(this)
    }
})(window.jQuery);
长期地址
遇到问题?请前往 GitHub 提 Issues。