I want to have a modal window opened and I've set modal
to true
in my code. But it does not work as expected:
$("#fileuploadfun").attr('title',"Uploa开发者_如何学运维d");
$("#fileuploadfun").dialog( "option", "modal", true );
How can I solve this issue ?
Try the .dialog
initialiser syntax:
$("#fileuploadfun").dialog({ modal: true });
According to the documentation, the syntax you've used there is for setting the modality after the dialog has been initialised.
I think you're trying to add a modal after the dialog is open, or vice versa. I ran into the same problem. It's addressed in this ticket: http://bugs.jqueryui.com/ticket/6803
This is expected behavior, doing the getter/setter will actually change the option modal if it gets launched again, not while it's open.
精彩评论