Jquery Mobile:Mobile.pageLoad()出现错误

Jquery Mobile: getting error with mobile.pageLoading()

本文关键字:Mobile 错误 pageLoad Jquery      更新时间:2023-09-26

使用jquery.mobile-1.0rc1;在简单对话框中工作时出错-

Chrome中的错误消息-

Uncaught TypeError: Object #<Object> has no method 'pageLoading'

&在FF-

$.mobile.pageLoading() is not a function

这是代码片段-

$(document).delegate('#importCCRLink', 'click', function() {
  $(this).simpledialog({
    'mode' : 'bool',
    'prompt' : 'Are you sure to import?',
    'useModal': true,
    'buttons' : {
      'OK': {
        click: function () {
         showTempLoading();
        },
    theme: "p"
      },
      'Cancel': {
        click: function () {
          //alert('Cancel');
        }
      }
    }
  })
})
function showTempLoading()
{
    $.mobile.pageLoading();
}

-任何想法!

删除$.mobile.pageLoading()调用,并将其替换为$.mobile.showPageLoadingMsg()$.mobile.hidePageLoadingMsg()