【问题标题】:Jquery Mobile Swipe events are not firingJquery Mobile Swipe 事件未触发
【发布时间】:2017-08-27 07:02:07
【问题描述】:

我正在使用引导程序,并希望对 img 轮播启用滑动手势。我在旋转木马项目的滑动处理程序上注册,例如:

    $(".carousel-inner").on( "swipe", ".item",  function () {
        console.log("swiped");
    });

注册点击事件处理程序也可以正常工作,因此元素的选择似乎有效。此外 ($.mobile) 返回 true 以便正确加载 jquery mobile。

我通过 USB 电缆连接了我的智能手机,并通过 chrome 开发人员工具跟踪调试。点击设备会触发点击事件,但滑动不会做任何事情。

猜猜为什么现在会触发滑动事件?

【问题讨论】:

    标签: android jquery twitter-bootstrap jquery-mobile swipe


    【解决方案1】:

    原来 jquery mobile 没有正确加载由于 jquery 核心版本不兼容(版本 3.1.1。)。将版本更改为 1.11.1,现在一切正常。

    【讨论】:

      猜你喜欢
      • 2016-09-07
      • 1970-01-01
      • 1970-01-01
      • 2013-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多