سؤال

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

هل كانت مفيدة؟

المحلول

I needed to include the zepto 'touch' module.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top