我使用滑动功能遇到了jquerymobile的问题,我试图左右滑动以打开和关闭菜单,虽然它可以点击例如拖动点击但是当我用它来屏幕时它没有。
我的网页是http://www.2click4.com/new/mobile/untitled.html
$( document ).on( "swipeleft swiperight", "#page", function( e ) {
// We check if there is no open panel on the page because otherwise
// a swipe to close the left panel would also open the right panel (and v.v.).
// We do this by checking the data that the framework stores on the page element (panel: open).
if ( $.mobile.activePage.jqmData( "panel" ) !== "open" ) {
if ( e.type === "swipeleft" ) {
$( "#right-panel" ).panel( "open" );
} else if ( e.type === "swiperight" ) {
$( "#left-panel" ).panel( "open" );
}
}
});
这是刷卡的主要代码,虽然在PC上工作正常,但在移动设备上不起作用!有人可以帮忙吗?我是新来的。