繁体   English   中英

jQuery UI Dialgo模式的标题html标签未呈现

[英]JQuery UI Dialgo modal's title html tags is not rendered

我目前正在向我的应用程序添加模式。 显示模态时,它还会在模态标题中显示html标签。 屏幕

如您所见,对话框标题未呈现,并且显示html标签。 这是对话框html

<div id="dialog_simple" title="Dialog Simple Title">
  <p>
   Dialog part is woring just fine.
  </p>

</div>

和这里相关的javascript打开模态

$('#dialog_link').click(function() {
        $('#dialog_simple').dialog('open');
        return false;
  });


 $('#dialog_simple').dialog({
          autoOpen : false,
          width : 600,
          resizable : false,
          modal : true,
          title : "<div class='widget-header'><h4><i class='fa fa-warning'></i> Empty the recycle bin?</h4></div>",
          buttons : [{
            html : "<i class='fa fa-trash-o'></i>&nbsp; Delete all items",
            "class" : "btn btn-danger",
            click : function() {
              $(this).dialog("close");
            }
          }, {
            html : "<i class='fa fa-times'></i>&nbsp; Cancel",
            "class" : "btn btn-default",
            click : function() {
              $(this).dialog("close");
            }
          }]
        });

        })

我想念什么吗? 提前致谢

看起来这与Bootstrap无关。 从我所看到的来看,您正在使用jQuery UI对话框( http://jqueryui.com/dialog/ ),对吗?

title属性仅接受字符串,但是您可以覆盖默认行为,如下所示: https : //stackoverflow.com/a/14488776/3215856

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM