相关疑难解决方法(0)

Anythingslider触摸滑动功能可以停止正常点击IOS和平板电脑设备上的链接

我正在使用任何滑块jquery插件与触摸事件.它似乎在所有设备上按预期工作,允许用户通过触摸平板电脑和ios设备以及在桌面上使用鼠标来"滑动".

$('#slider').anythingSlider({   
// Callback when the plugin finished initializing
onInitialized: function(e, slider) {

var time = 1000, // allow movement if < 1000 ms (1 sec)
        range = 50,  // swipe movement of 50 pixels triggers the slider
        x = 0, t = 0, touch = "ontouchend" in document,
        st = (touch) ? 'touchstart' : 'mousedown',
        mv = (touch) ? 'touchmove' : 'mousemove',
        en = (touch) ? 'touchend' : 'mouseup';

    slider.$window
        .bind(st, function(e){
            // prevent image drag (Firefox)
            e.preventDefault();
            t …
Run Code Online (Sandbox Code Playgroud)

jquery html5 anythingslider

3
推荐指数
1
解决办法
5562
查看次数

标签 统计

anythingslider ×1

html5 ×1

jquery ×1