【问题标题】:On event swipe in meteor在流星中滑动事件
【发布时间】:2015-08-06 13:30:42
【问题描述】:

如何调用滑动事件?我想触发滑动事件。以下代码在正常查询事件中工作正常。不知道在流星事件中如何实现。

  $('.your-class').on('swipe', function(event, slick, direction){
    console.log(direction);
  });

在流星中:

Template.template.events({
 '???? .your-class':function(event, slick, direction){
    console.log(event);
  }
});

【问题讨论】:

    标签: javascript meteor meteor-blaze


    【解决方案1】:

    试试hammer:hammer 包。

    还有这个Events

    Template.NAME.events({
    'swipeleft #hammerDiv': function(e, t) {
        e.preventDefault();
    
        // event
      },
    'swiperight #hammerDiv': function(e, t) {
        e.preventDefault();
    
        // event
      }
    });
    

    【讨论】:

      猜你喜欢
      • 2015-05-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-20
      • 2016-09-21
      • 1970-01-01
      相关资源
      最近更新 更多