Jquery移动设备上的移动设备刷卡

时间:2015-12-21 15:06:41

标签: javascript jquery html5 css3 jquery-mobile

我的jQuery移动库有问题。我想在图像上使用滑动事件在我的iPhone上用手指触摸它们,但它不起作用。我试着像这样使用它:

function myEvent() {
  if ($("#myImageFront").swiperight) {
    console.log("hey");
    $.mobile.changePage("localhost/myOtherPage.php")
  }
}

<img class="myImage" id="myImageFront" src="myImage.png">

它甚至没有继续我的功能。

1 个答案:

答案 0 :(得分:0)

你试过这个吗?

$("#myImageFront").on("swiperight", function(event) {
    console.log("Hey");
    //do more stuff
});
相关问题