jQuery UI Dialog Button Icons

后端 未结 12 1478
[愿得一人]
[愿得一人] 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:12

    also you can add id or other attr to button, like this:

    buttons:[
                {
                    text: "Close",
                    id: "closebtn",
                    click: function() { $(this).dialog("close"); }
                }
            ],
    open: function() {
                $("#closebtn").button({ icons: { primary: "ui-icon-close" } });
            }
    

提交回复
热议问题