Apply CSS to jQuery Dialog Buttons

前端 未结 10 2128
攒了一身酷
攒了一身酷 2020-12-01 01:02

So I currently have a jQuery dialog with two buttons: Save and Close. I create the dialog using the code below:

$dialogDiv.dialog({
    autoOpen: false,
             


        
10条回答
  •  一整个雨季
    2020-12-01 01:50

    You should change the word "className" for "class"

    buttons: [ 
        { 
            text: "Cancel",
            class: 'ui-state-default2', 
            click: function() { 
                $(this).dialog("close"); 
            } 
        }
    ],
    

提交回复
热议问题