jQuery UI Dialog Button Icons

后端 未结 12 1473
[愿得一人]
[愿得一人] 2020-11-29 02:40

Is it possible to add icons to the buttons on a jQuery UI Dialog? I\'ve tried doing it this way:

$(\"#DeleteDialog\").dialog({
    resizable: false,
    hei         


        
12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 03:06

    This version works without having to worry about the text in the buttons

    open: function() {
        $(this).parent().find('.ui-dialog-buttonpane button:first-child').button({
            icons: { primary: 'ui-icon-circle-close' }
        });
        $(this).parent().find('.ui-dialog-buttonpane button:first-child').next().button({
            icons: { primary: 'ui-icon-circle-check' }
        });
    }
    

提交回复
热议问题