Firing twice when swipeleft and swiperight in jquery mobile?

喜你入骨 提交于 2019-12-06 04:46:41

This is because the events are getting bind twice for the page.

1.It is recommended to use .on() instead of .bind() I am using it outside of pagecreate/init/show and I am not facing any issues with .on eg.

$('#article1').on('swipeleft', function(event,ui)
{
    $.mobile.changePage("swipepage2.html", "slide"); 
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!