【发布时间】:2016-01-29 01:24:02
【问题描述】:
我在使用 jQuery Mobile 和 Firefox 时遇到问题。 问题是 Firefox 中的滑动事件不起作用。这是我正在使用的代码(您已在图像上滑动):
$('#slider_Backgrounds').on("swipeleft",sliderControlRight);
我希望有人可以帮助我使这段代码也能在 FireFox 中运行。
提前致谢
【问题讨论】:
我在使用 jQuery Mobile 和 Firefox 时遇到问题。 问题是 Firefox 中的滑动事件不起作用。这是我正在使用的代码(您已在图像上滑动):
$('#slider_Backgrounds').on("swipeleft",sliderControlRight);
我希望有人可以帮助我使这段代码也能在 FireFox 中运行。
提前致谢
【问题讨论】:
希望这个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 了解更多选项并了解更好的使用方法。
【讨论】: