When creating a dialog with jquery, how do I hide the dialog div?

后端 未结 2 1087
说谎
说谎 2020-12-09 18:02

I am creating a dialog like in this page:

http://jqueryui.com/demos/dialog/#modal-confirmation

(click view source)

on the bottom is the div that g

相关标签:
2条回答
  • 2020-12-09 18:16

    This may be a stupid question, but instead of "visibility:hidden" have you tried "display:none;"? I had to solve the same problem for a project I'm working on and I'm reasonably sure display:none worked.

    You can also use the

    $(foo).dialog({ autoOpen: false });
    

    option to "initialize" the dialog (thus hiding it and all that good stuff). The only catch is, you'll probably see the dialog "flicker" as the page loads but before jQuery has a chance to hide it.

    0 讨论(0)
  • 2020-12-09 18:30

    You can try the following it works for me:

    $("#form-dialog").dialog("close");
    
    0 讨论(0)
提交回复
热议问题