SimpleModal Makes Div in Modal Dialog Opacity: 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);
});
$('开发者_StackOverflow社区 #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.
精彩评论