kevzettler
kevzettler

Reputation: 5213

How to trigger zepto swipe events with device interactions

I have this straight forward zepto swipe code

$(function(){

  $(document).on('swipeRight',function(e){
    alert("right");
  });

  $(document).on('swipeLeft', function(e){
    alert("left");
  });

});

I can't seem to trigger this from the iOSSimulator or on an actual device. I can however call $(document).trigger('swipeRight') from a console and trigger the events. I'm not seeing any obvious error output

using Zepto v1.0-1-ga3cab6c

IOs 7

Upvotes: 1

Views: 2052

Answers (1)

kevzettler
kevzettler

Reputation: 5213

I needed to include the zepto 'touch' module.

Upvotes: 3

Related Questions