Error with Jquery UI Dialog in Ie7 / Ie8
have abit of a problem with Jquery UI dialog. I set it to modal:true, and so when i initialize the dialog, i do see the grey overlay. However, the dialog itself simply does not appear. This is the strange part (perhaps): when I put settings to autoOpen: true, the dialog appears fine, it simply does not appear again when i click. Any ideas? Thanks in advance.
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery('#loginforms').dialog({
autoOpen: false,
height: 230,
width: 330,
modal: true,
position: 'center',
buttons: {
Cancel: function() { jQuery(this).dialog('close'); },
"Log in": function() { jQuery('#login').submit(); }
}
});
jQuery('#loginbutton li a').click(function(){
jQuery('#loginforms').dialog('open');
return false;
开发者_如何学JAVA });
});
</script>
...
<div id="loginforms" style="overflow-x:hidden;">
<form method="post" action="summary.html" class="forms" id="login">
<h2 style="font-size:16px; text-align:left;">Please login to your account: </h2><br />
<label for="name">Name</label>
<input value="" class="required" id="name" name="name" />
<label for="password">Password</label>
<input value="" class="required" id="password" name="password" type="password" />
</form>
</div>
I thought I'd just post since i figured out the problem. It turns out that it was a incompatibility between curvycorners.js and jquery-UI (in particular, dialog). Sorry for not reflecting that in my question, it never occurred to me that the problem could be that. Just posting here in case anyone else has a similar problem.
It seems that you are not executing the Dialog.show, I think the problem is on the selector for the Anchor (link) Check out the wrapped set returned when you are binding the Click.
jQuery('#loginbutton li a').click(function(){
does that selector retrieves you something?, cause I don't see it on your code example :S
hope it helps!
精彩评论