jQuery-ui dialog - hide buttons using jquery

前端 未结 4 1349
-上瘾入骨i
-上瘾入骨i 2021-01-07 04:38

How do I remove/hide the \"Ok\" button dynamically using jquery?

$(\'#dialog-save\').dialog({
            autoOpen: false,
            modal: false,
                


        
4条回答
  •  情深已故
    2021-01-07 05:13

    You can set the buttons option in the same way you are setting the title:

    saveDialog.dialog("option", "buttons", {});
    

    Pass in an empty object literal to remove all the buttons. That should be fine, since you appear to only have the one button. If you were to have others, just specify the ones you want to keep when you call the option method.

提交回复
热议问题