【问题标题】:Jquery on swipeleft event not working on my div elementswipeleft 事件上的 Jquery 不适用于我的 div 元素
【发布时间】:2021-09-27 23:34:28
【问题描述】:

我试图在我的 div 上附加一个 swipeleft 事件。但它不工作 这是我的 jsfiddle 链接: https://jsfiddle.net/yumhev1L/

$('#testCnt').on('swipeleft', 'div',function(){
    alert('swipe');
});

我真的不明白为什么它不起作用

【问题讨论】:

标签: jquery events swipe


【解决方案1】:

“swipe”是一个 jquery-mobile 方法 - https://jsfiddle.net/humanman555/qb8gzdc2/2/

  <link rel="stylesheet" href="//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.css">
  <script src="//code.jquery.com/jquery-3.2.1.min.js"></script>
  <script src="//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.js"></script>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-06-07
    • 2014-07-12
    • 1970-01-01
    • 2023-03-24
    • 2013-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多