开发者

jQuery modal dialog is not working

开发者 https://www.devze.com 2023-03-14 14:01 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消