0
我在打開彈出窗口時正在執行少量功能。 它需要2-3秒,所以我想添加一些消息加載,並將光標更改爲等待/進度,直到彈出窗口打開。如何顯示等待光標和消息當彈出窗口打開時加載
如何在jquery/js中實現這個功能?
編輯
$('#open_fancy_popup').click(function(){
$("body").css("cursor","wait");
updateDropDown();
updateRows();
populate();
enableCheckbox();
$("body").css("cursor","initial");
});
我嘗試這樣做:
<div id="WaitDialog" class="hidden" style="text-align: center">
<img src="css/images/loading_black.gif" />
<div style="margin-top: 10px; color: white">
<b>Please wait</b>
</div>
</div>
,並添加$("#WaitDialog").modalDialog();
所有的功能之前,但它沒有工作? 有沒有解決這個問題的簡單方法?
裏添加嗎?點擊功能裏面? – PSDebugger
或者創建一個類似'.wait {cursor:wait; }'並大量應用於所有使用jQuery的元素:'$('*')。toggleClass('wait')'。 – kosmos
是的,這在開始和第二次結束 $(「body」)。css(「cursor」,「initial」); –