【问题标题】:Element shown as text in Tooltipster (tooltipster.js)在 Tooltipster (tooltipster.js) 中显示为文本的元素
【发布时间】:2016-02-09 00:38:02
【问题描述】:

我正在使用 Tooltipster.js 来应用精美的工具提示。问题是,当我在工具提示中设置文本时,它会按原样呈现,这是我不想要的。我希望它显示为呈现的 html。

例如

这是我的代码:

var total = "<p><strong>text</strong></p>";

$(this).tooltipster({
    content: total,
    multiple: true
});

现在,工具提示将其显示为&lt;p&gt;&lt;strong&gt;text&lt;/strong&gt;&lt;/p&gt;。我希望它看起来像 文本

我该怎么做?

【问题讨论】:

    标签: tooltipster


    【解决方案1】:

    我明白了。

    我必须添加contentAsHTML: true

    查看了 Stackoverflow 中的其他帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-03
      • 2023-03-31
      • 2018-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多