[英]Question about using jquery tooltipster plugin
I'm using tooltipster to show some data.我正在使用 tooltipster 来显示一些数据。 (using jquery, tooltipster)
(使用 jquery,工具提示器)
Below is my code.下面是我的代码。
<html>
<header>
<style>
#tooltip_content{display: none;}
</style>
</header>
<body>
<span class="tooltip" data-tooltip-content="#tooltip_content">This span has a tooltip with HTML when you hover over it!</span>
<div id="tooltip_content">
<div>
<img src="../static/images/caticon.png" />
</div>
<strong>This is the content of my tooltip!</strong>
</div>
<script>
$(document).ready(function(){
$('.tooltip').tooltipster({
content: $('#tooltip_content').html()
});
})
</script>
</body>
</html>
when I run the code, html code is printed in tooltip.当我运行代码时,html 代码会打印在工具提示中。
IS there a solution to print my code to html?是否有将我的代码打印到 html 的解决方案?
I found the answer.我找到了答案。
I have to use contentAsHTML: true我必须使用contentAsHTML: true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.