【问题标题】:changePage event calls second page as soon as called third page unexpectedly意外调用第三页时,changePage 事件调用第二页
【发布时间】:2012-08-21 04:46:10
【问题描述】:

我在带有 phonegap 的 jquery 移动应用程序中有三个单独的 html 页面。从一个页面 onChange 事件调用第二个页面。但是第二页 pageinit 在该页面关闭后立即调用并转到第三页。我没有在页面初始化或其他一些元素中调用第三页。在 jquery mobile changepage 事件中是否存在类似这样的已知问题?

//called from first page link button 
function mysubmit()
{
    $.mobile.changePage("secondpage.html",{reloadPage:true,transition: "none"});
}


//This event fired
$(document).delegate("#secondpage_id", "pageinit", function() {
  alert('secondpage_id was just created by jQuery Mobile!');
});

一旦触发,它就会关闭第二页并显示第三页。

【问题讨论】:

    标签: jquery jquery-mobile


    【解决方案1】:

    这可以通过从第一页链接按钮中删除data-rel=back 属性来解决。

    【讨论】:

      猜你喜欢
      • 2015-05-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多