The mobile swipe component handles user horizontal swiping events.

Getting Started

To register a swipe event for a given jQuery selector, use the kendoMobileSwipe jQuery plugin method.

swipe event handling

<div>
<p>Foo</p>
</p>Bar</p>
</div>

<script>
 $("p").kendoMobileSwipe(function(e) {
     console.log("You swiped" + e.target.text() );
 });
</script>

The event handler accepts a parameter with the following fields:

target The DOM element which was swiped
direction The swipe direction. Can be either left or right.
drag An instance of the kendo.Drag component, containing additional information about the drag event sequence, that generated the swipe.

Configuration

The swipe event criteria (minimum horizontal distance, maximum vertical deviation, timing, and swipe surface) can be configured by passing an additional parameter to the kendoMobileSwipe method. For more details, see the configuration section.

Listen only for longer and faster swipe events

<div>
<p>Foo</p>
</p>Bar</p>
</div>

<script>
 $("p").kendoMobileSwipe(function(e) {
     console.log("You swiped" + e.target.text() );
 }, { minXDelta: 200, maxDuration: 100 });
</script>