簡體   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