jQueryUI modal dialog does not show close button (x)

后端 未结 15 2850
鱼传尺愫
鱼传尺愫 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:19

    In the upper right corner of the dialog, mouse over where the button should be, and see rather or not you get some effect (the button hover). Try clicking it and seeing if it closes. If it does close, then you're just missing your image sprites that came with your package download.

    0 讨论(0)
  • 2020-12-13 00:20

    Just check the close button image path in your jquery-ui.css:

    .ui-icon { 
        width: 16px; 
        height: 16px; 
        background-image: url**(../img/ui-icons_222222_256x240.png)**/*{iconsContent}*/; 
    }
    .ui-widget-content .ui-icon {
        background-image: url(../img/ui-icons_222222_256x240.png)/*{iconsContent}*/; 
    }
    .ui-widget-header .ui-icon {
        background-image: url(../img/ui-icons_222222_256x240.png)/*{iconsHeader}*/; 
    }
    .ui-state-default .ui-icon { 
        background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; 
    }
    .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {
        background-image: url(../img/ui-icons_454545_256x240.png)/*{iconsHover}*/; 
    }
    .ui-state-active .ui-icon {
        background-image: url(../img/ui-icons_454545_256x240.png)/*{iconsActive}*/; 
    }
    

    Correct the path of icons_222222_256x240.png and ui-icons_454545_256x240.png

    0 讨论(0)
  • 2020-12-13 00:21

    I think the problem is that the browser could not load the jQueryUI image sprite that contains the X icon. Please use Fiddler, Firebug, or some other that can give you access to the HTTP requests the browser makes to the server and verify the image sprite is loaded successfully.

    0 讨论(0)
提交回复
热议问题