springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-18 13:07:27
138
我使用TippyJS在悬停时显示一个文本弹出窗口,但我也想在5秒后在PageLoad上显示这个弹出窗口,所以我这样做:
const instance = tippy('.tooltippy', {
trigger: 'mouseenter',
allowHTML: true,
placement: 'left',
animation: 'scale-subtle',
interactive: true,
content: function (reference) {
return reference.querySelector('.tooltipcontent');
}
});
setTimeout(function() {
instance.show();
}, 5000);
但5秒钟后,我得到:
Uncaught TypeError: instance.show is not a function
而我的Tippyjs工作正常。
我的HTML:
<span class="whatsappicon tooltippy" title="Chat met ons!">
<span class="whaplabel tooltipcontent">Stel je vraag!</span>
<a href="url" target="_blank">
<img src="images/custom/whatsapp_online.png" alt="Open Whatsapp">
</a>
</span>
我该怎么做才能在5秒钟后打开这个小尖头?
顺晟科技:
更新了我的问题,因为我没有看到您将其直接分配给HtmlCollection.Tippy需要绑定到NodeList或元素类型,因此我们需要首先获取元素并将其分配给它。
这个例子应该是可行的:
const tooltippy = document.getElementById('tooltippy')
const instance = tippy(tooltippy, {
trigger: 'mouseenter',
allowHTML: true,
placement: 'left',
animation: 'scale-subtle',
interactive: true,
content: function (reference) {
return reference.querySelector('.tooltipcontent');
}
});
setTimeout(function() {
instance.show();
}, 5000);
<代码><;script SRC=“ https://unpkg.com/@popperjs/core@2/dist/UMD/Popper.min.JS ”>;<;/script>;<;script SRC=“ https://unpkg.com/tippy.js@6/dist/tip-bundle.UMD.JS ”>;<;/script>;<;span CLASS=“ WhatsAppIcon ” ID=“ Tooltippy ” TITLE=“聊天工具!”>;<;span Class=“ whapLabel TooltipContent ”>;stel je vraag!<;/span>;<;a href=“ URL ” target=“_空白”>;<;IMG SRC=“ images/custom/WhatsApp_在线.PNG ” alt=“打开WhatsApp ”>;<;/a>;<;/span>;
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11