enableSwipe Boolean (default: false)

If set to true, the Touch widget will recognize horizontal swipes and trigger the swipe event.

Notice: if the enableSwipe option is set to true, the dragstart, drag and dragend events will not be triggered.


<div id="touch">
    Swipe me

    enableSwipe: true,
    swipe: function (e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
        console.log("User swiped the element");
In this article