Icons in jQuery UI dialog title

后端 未结 5 968
一整个雨季
一整个雨季 2020-12-28 15:47

I\'m using the code below to create a jQuery dialog box. By default there is a close icon on title bar, but I want to add some of the other icons in title bar as well for di

5条回答
  •  甜味超标
    2020-12-28 16:29

    You can do that by adding some HTML code to title bar when dialog opened.

    $("document").ready(function () {
            $("#dialog").dialog({
                title: "Dialog Title",
                height: 400,
                width: 500,
                open: function(event, ui){
                    $(this).parent().find('.ui-dialog-titlebar').append('Some HTML');
                }
            });
        });
    

提交回复
热议问题