jQuery UI Dialog - missing close icon

前端 未结 17 2219
礼貌的吻别
礼貌的吻别 2020-11-28 19:15

I\'m using a custom jQuery 1.10.3 theme. I downloaded every straight from the theme roller and I have intentionally not changed anything.

I created a dialog box and I

17条回答
  •  佛祖请我去吃肉
    2020-11-28 19:38

    I am having this issue as well. Here is the code that is getting inserted for the close button:

    From Web Developer showing the jquery-created code

    When I turn off the style="display:none:" on the button, then the close button appears. So for some reason that display:none; is getting set, and I don't see how to control that. So another way to address this might be to simply override the display:none. Don't see how to do that though.

    I note that the answer posted by KyleMit does work, but makes a different looking X button.

    I also note that this issue does not affect all dialogs on my pages, but just some of them. Some dialogs work as expected; other have no title (ie, the span containing the title is empty) while the close button is present.

    I am thinking something is seriously wrong and it might not the time for 1.10.x.

    But after further work, I discovered that in some cases the titles were not getting set properly, and after fixing that, the X close button reappeared as it should be.

    I used to set the titles like this:

    ('#ui-dialog-title-ac-popup').text('Add Admin Comments for #' + $ac_userid);
    

    That id does not exist in my code, but is created apparently by jquery from ac-popup and ui-dialog-title. Kind of a kludge. But as I said that no longer works, and I have to use the following instead:

    $('.ui-dialog-title').text('Add Admin Comments for #' + $ac_userid);
    

    After doing that, the missing button issue seems to be better, although I am not sure if they are definitely related.

提交回复
热议问题