gpt4 book ai didi

user-interface - 如何在 jQuery Mobile 中使用页面加载来阻止 UI

转载 作者:行者123 更新时间:2023-12-04 04:31:10 24 4
gpt4 key购买 nike

是否可以在使用 $.mobile.pageLoading(false) 时阻止 UI?

最佳答案

此功能未在 jQueryMobile Alpha 1.0a4.1 中实现。

我解决了添加具有足够高 z-index 的叠加 div 的问题。

JS:

$(document).ready(function () {         
$('body').append('<div id="block-ui"></div>');

$('#ajax_request').click(function(){
$('#block-ui').show();
$.mobile.pageLoading(false);
});
});

CSS:

#block-ui {
display: none;
cursor: wait;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: 9;
background-color: #CCCCCC;
opacity: 0.5;
}

如果您使用的是固定条,则需要覆盖 z-index 值:

.ui-header-fixed, .ui-footer-fixed {
z-index: 8 !important;
}

关于user-interface - 如何在 jQuery Mobile 中使用页面加载来阻止 UI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5564496/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com