Jquery Mobile:使用mobile.pageLoading()获取错误

Avi*_*i C 4 javascript loading jquery-mobile

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

Chrome中的错误消息 -

Uncaught TypeError: Object #<Object> has no method 'pageLoading'
Run Code Online (Sandbox Code Playgroud)

在FF-

$.mobile.pageLoading() is not a function
Run Code Online (Sandbox Code Playgroud)

这是代码片段 -

$(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();
}
Run Code Online (Sandbox Code Playgroud)

-任何的想法!

Ger*_*ine 15

删除$.mobile.pageLoading()呼叫并将其替换为$.mobile.showPageLoadingMsg()和$.mobile.hidePageLoadingMsg().