【问题标题】:Swipe event doesn't work on firefox滑动事件在 Firefox 上不起作用
【发布时间】:2016-01-29 01:24:02
【问题描述】:

我在使用 jQuery Mobile 和 Firefox 时遇到问题。 问题是 Firefox 中的滑动事件不起作用。这是我正在使用的代码(您已在图像上滑动):

$('#slider_Backgrounds').on("swipeleft",sliderControlRight);

我希望有人可以帮助我使这段代码也能在 FireFox 中运行。

提前致谢

【问题讨论】:

    标签: jquery html firefox


    【解决方案1】:

    希望这个fiddle能帮到你,

    HTML:

    <div class="slider_Backgrounds">
    
    </div>
    <div class="slider_Backgrounds">
    
    </div>
    <div class="slider_Backgrounds">
    
    </div>
    <div class="slider_Backgrounds">
    
    </div>
    

    jQuery:

     $(document).on("swipeleft",'.slider_Backgrounds',sliderControlRight);    
    
     function sliderControlRight(){
       $(this).hide();
       alert(1232);
     }
    

    查看api reference 了解更多选项并了解更好的使用方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-08-07
      • 2016-03-28
      • 2019-06-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多