jQueryUI modal dialog does not show close button (x)

后端 未结 15 2934
鱼传尺愫
鱼传尺愫 2020-12-12 23:45

I\'m using a jQuery modal dialog in my ASP .NET MVC 3 application. It works fine except for that there is no close button showing in the top right corner. How can I add thi

15条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 00:02

    While the op does not explicitly state they are using jquery ui and bootstrap together, an identical problem happens if you do. You can resolve the problem by loading bootstrap (js) before jquery ui (js). However, that will cause problems with button state colors.

    The final solution is to either use bootstrap or jquery ui, but not both. However, a workaround is:

        $('
    dialog content
    ').dialog({ title: 'Title', open: function(){ var closeBtn = $('.ui-dialog-titlebar-close'); closeBtn.append('close'); } });

提交回复
热议问题