2013-03-25 57 views

回答

3

我确信只有桌面浏览器有这个问题,因为移动浏览器通常不会在刷卡拖动图像。

的解决方案建议here防止在所有浏览器上拖动图像:

$('img').on('dragstart', function(event) { 
    event.preventDefault(); 
}); 

因此,这里是你的新工作提琴:http://jsfiddle.net/4CbEQ/1/

3

您需要防止图像拖动,这里有一个工作示例:http://jsfiddle.net/Gajotres/SgUZK/

$(document).on('pagebeforeshow', '#index', function(){ 
    $('img').on('dragstart', function(event) { event.preventDefault(); }); 

    $("#one").on("swiperight", function() { 
     alert("does not work"); 
    }); 
    $("#two").on("swiperight", function() { 
     alert("works"); 
    }); 
});