SimpleModal 使模态对话框中的 Div 不透明度:0?
在我问问题之前,我意识到我可能没有充分利用 simplemodal 的全部潜力,所以请耐心等待。
我的 HTML 中有以下模态对话框:
<div id="confirm_delete_role">
<h1>Are You Sure You Want To Proceed?</h1>
<div id="confirm_parameter_role"></div>
<p class="right_button"><a class="ui_navigation" href="javascript:$.modal.close(); var e = document.getElementById('confirm_parameter'); e.innerHtml = ''; var f = hLoader.setCheckStatus('confirm/callback'); f();">Proceed</a>
<a class="ui_navigation" href="javascript:$.modal.close(); var e = document.getElementById('confirm_parameter'); e.innerHtml = '';">Cancel</a></p>
</div>
在 javascript 的另一个区域中,我调用此对话框,我预先加载 inform_parameter_role 并提供回调:
hLoader.loadDiv('admin/roles/confirm', 'return-parameter', undefined, 'confirm_parameter_role', function(){
hLoader.setCheckStatus('confirm/callback', function(){
var replace = document.getElementById('input_parameter_role');
replace = replace.options[replace.selectedIndex].value;
hLoader.loadViewportContent('admin/roles/delete/role/' + document.getElementById(idSrc).value + '/replace/' + replace);
});
$(' #confirm_delete_role ').modal();
});
hLoader.loadDiv 是对 jQuery .load 函数的稍微修改的包装器,但本质上执行同样的事情(它加载地址 admin/roles/confirm,读取 #return-parameter 并将其放入 #confirm_parameter_role 中)。它创造了这一点:
<div id="confirm_parameter_role">
<form>
<label for="input_parameter_role" id="input_parameter_role-label">Replacement Role For Current Accounts:</label>
<select name="input_parameter_role" id="input_parameter_role">
<option value="1" label="Clients">Clients</option>
<option value="2" label="Employees">Employees</option>
ETC.
</select>
</form>
</div>
除了一件事之外,整个过程都运行良好。神秘的是,我的 #confirm_parameter_role div 的样式设置为“不透明度:0;”在某些时候(不是通过我的代码),所以当模式对话框出现时......没有表单或选择栏。
有什么想法吗?还有其他人将模态框内的 div 设置为 0 不透明度吗?提前感谢您提供任何线索。
Before I ask the question I realize I may not be using the full potential of simplemodal, so bear with me please.
I have the following modal dialog in my HTML:
<div id="confirm_delete_role">
<h1>Are You Sure You Want To Proceed?</h1>
<div id="confirm_parameter_role"></div>
<p class="right_button"><a class="ui_navigation" href="javascript:$.modal.close(); var e = document.getElementById('confirm_parameter'); e.innerHtml = ''; var f = hLoader.setCheckStatus('confirm/callback'); f();">Proceed</a>
<a class="ui_navigation" href="javascript:$.modal.close(); var e = document.getElementById('confirm_parameter'); e.innerHtml = '';">Cancel</a></p>
</div>
In another area of javascript where I summon this dialog I load up the confirm_parameter_role beforehand and provide a callback:
hLoader.loadDiv('admin/roles/confirm', 'return-parameter', undefined, 'confirm_parameter_role', function(){
hLoader.setCheckStatus('confirm/callback', function(){
var replace = document.getElementById('input_parameter_role');
replace = replace.options[replace.selectedIndex].value;
hLoader.loadViewportContent('admin/roles/delete/role/' + document.getElementById(idSrc).value + '/replace/' + replace);
});
$(' #confirm_delete_role ').modal();
});
hLoader.loadDiv is a slightly modified wrapper around the jQuery .load function, but essentially performs the same thing (It loads the address admin/roles/confirm, reads #return-parameter and puts it into #confirm_parameter_role). It creates this:
<div id="confirm_parameter_role">
<form>
<label for="input_parameter_role" id="input_parameter_role-label">Replacement Role For Current Accounts:</label>
<select name="input_parameter_role" id="input_parameter_role">
<option value="1" label="Clients">Clients</option>
<option value="2" label="Employees">Employees</option>
ETC.
</select>
</form>
</div>
The whole process works great except for one thing. Mysteriously, my #confirm_parameter_role div has it's style set to "Opacity: 0;" at some point (not by my code) so when the modal dialog box appears... there's no form or select bar.
Any ideas? Anybody else getting their div's inside their modal boxes set to 0 opacity? Thanks ahead for any clues.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论