jquery对话框不允许标题中的html

时间:2014-02-03 17:26:25

标签: jquery jquery-ui-dialog

有一个对话框,我将title_html:选项设置为true,但它仍然会转义html,因此标题会显示代码而不是图标。

任何人都能看到我做错了什么?

  <div id="resend_confirmation_dialog" >
    <div class="well-warning">
      Are you sure you want to resend this invitation?
    </div>
  </div>   

这样触发:

$(".confirm-resend").on("click", function(e) {
        var link = this;

        e.preventDefault();

        console.log('resend button clicked');
        $( "#resend_confirmation_dialog" ).removeClass('hidden').dialog({
                            resizable: true,
                            autoOpen: true,
                            modal: false,
                            title_html: true,
                            title: "<h4 class='smaller'><i class='icon-warning-sign red'></i> Are you Sure</h4>",

                            buttons: {
                                "Ok": function() {
                                    window.location = link.href;
                                },
                                "Cancel": function() {
                                    $(this).dialog("close");
                                }
                            }
                });
        }
    );

0 个答案:

没有答案