2013-08-12 79 views
1

我有這樣的模態窗口:顯示正在加載的旋轉圖像,同時加載外部頁面

HTML:

<div id="showEvents"><canvas id="event" width="32" height="32"></canvas></div> 

JS:

$(document).ready(function() { 
    var dialog1 = $('<div>').dialog({ autoOpen: false,modal:true, 
    height: 400, 
    width: 450 
    }); 
    $('#showEvents').click(function() { 
     dialog1.load('../Lists/Event.aspx').dialog('open'); 
    }); 
}); 

現在我想顯示在加載時旋轉器。我發現this問題,但我不知道我應該在哪裏放置微調圖像?

回答

2

只需使用.html()

dialog1.dialog('open'); 
dialog1.load('../Lists/Event.aspx').html('<img src="../img/pLoader.gif" alt="loading..."/> '); 
相關問題