在jquery mobile中显示对话框时要调用的事件

时间:2012-07-28 14:37:20

标签: jquery jquery-mobile

我有一个jquerymobile应用程序,有些页面正在加载ajax网络调用,所以我想显示一个对话框。我把它设置为但它出于某种原因非常显示。所以看起来页面只是空的而没有做任何工作。我应该在pageinit功能或pageshow上进行调用吗?谢谢你的帮助。

 $('#MyAlbums').live('pagebeforeshow', function (event) {
             $.mobile.showPageLoadingMsg();
              var myselect = $("select#select-choice-1");
              myselect[0].selectedIndex = 0;
              myselect.selectmenu("refresh");
            GetMyAlbumInformation('full');
        });

1 个答案:

答案 0 :(得分:1)

$(document).bind('mobileinit', function(){
  $('#MyAlbums').live('pagebeforeshow', function (event) {
    $.mobile.loadingMessage= ' The message I want to display ';
    $.mobile.showPageLoadingMsg();
    var myselect = $("select#select-choice-1");
    myselect[0].selectedIndex = 0;
    myselect.selectmenu("refresh");
    GetMyAlbumInformation('full');
   });
});