jQuery Dialog Box

后端 未结 10 1986
暖寄归人
暖寄归人 2020-12-07 15:39

Im trying to do a dialog box with jquery. In this dialog box Im going to have terms and conditions. The problem is that the dialog box is only displayed for the FIRST TIME.<

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 16:25

    If you need to use multiple dialog boxes on one page and open, close and reopen them the following works well:

     JS CODE:
        $(".sectionHelp").click(function(){
            $("#dialog_"+$(this).attr('id')).dialog({autoOpen: false});
            $("#dialog_"+$(this).attr('id')).dialog("open");
        });
    
     HTML: 
        

    Dialog 1

    Dialog 2

    CSS: div.dialog{ display:none; }

提交回复
热议问题