我正在尝试通过 JS 函数打开一个 Jquery Mobile 对话框,但它对我不起作用 这是函数
function showSettings()
{
document.getElementById('settings').style.display = 'none';
document.getElementById('passwordView').style.display = 'block';
$.mobile.changePage('#myPopupDialog', 'pop', true, true);
}
这是 jsFiddle <强> http://jsfiddle.net/7C8Lw/
最佳答案
您必须区分对话框 和弹出 小部件。 Dialog 是一个页面,但形状是对话框。因此,Dialog div 应该放在页面 div 之外。
<div data-role="page">
<!-- content -->
</div>
<div data-role="dialog">
<!-- content -->
</div>
关于javascript - 通过 JS 函数打开 JqueryMobile Dialog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23238271/