Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Mobile: getting error with mobile.pageLoading()

With jquery.mobile-1.0rc1; getting error while working in simple dialog-

error-message in Chrome-

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

& in FF-

$.mobile.pageLoading() is not a function

Here is the code snippet-

$(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();
}

-any idea!

like image 808
Avisek Chakraborty Avatar asked Dec 06 '22 18:12

Avisek Chakraborty


1 Answers

Remove $.mobile.pageLoading() call and replace it with $.mobile.showPageLoadingMsg() and $.mobile.hidePageLoadingMsg().

like image 131
GerjanOnline Avatar answered Feb 06 '23 00:02

GerjanOnline