大佬教程收集整理的这篇文章主要介绍了jquery mobile Panel滑动功能导致错误,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
所以我按照这个演示,http://view.jquerymobile.com/master/docs/examples/panels/panel-swipe-open.php#demo-page,现在我收到了错误.
$( document ).on( "pageinit","#demo-page",function() { $( document ).on( "swipeleft swiperight",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" ); } } });
});
我有点死,因为我有它工作,随便看看我的代码,http://yaasko.com/gra423/project-4.3/如果你试图向左或向右滑动控制台将输出错误.
如果你能提供帮助,请告诉我,第一次jquery移动用户!
像这样打开面板:
$( "#left-panel" ).panel().panel("open");
编辑:
$(document).on('pagebeforeshow','#index',function(){ $( document ).on( "swipeleft swiperight","#index",function( e ) { if ($.mobile.activePage.find('#left-panel').hasClass('ui-panel-closed') && e.type === "swipeleft") { $( "#right-panel" ).panel( "open" ); } if ($.mobile.activePage.find('#right-panel').hasClass('ui-panel-closed') && e.type === "swiperight") { $( "#left-panel" ).panel( "open" ); } }); });
以上是大佬教程为你收集整理的jquery mobile Panel滑动功能导致错误全部内容,希望文章能够帮你解决jquery mobile Panel滑动功能导致错误所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。