javascript - 使用 javascript 插件包含页脚
问题描述
所以我在 index.html 中包含了一个页脚,并且我有 footer.html 文件。唯一的问题是我使用了tippy工具提示插件,当我有没有包含功能的页脚时,它在页脚中工作,但是当我包含它时,插件不再工作。
<script>
$(function(){
$("#footer").load("footer.html");
});
</script>
<div id="footer"></div>
<div class="footer-copyright">
<span>© Lancashire Roleplay Community 2019 - All rights reserved</span>
<span class="footerDev">Website Developed by <a href="mailto:mail" data-tippy-content="Tooltip">Adrian B.</a></span>
</div>
解决方案
将tippy工具调用移至加载后
例如
$(function(){
$("#footer").load("footer.html",function() { tippy('#footer') });
});
推荐阅读
- java - 我可以将字符串变量从 eclipse (java) 发送到 powershell 脚本吗
- python - 气流:让操作员在多个触发规则上触发
- heroku - pr-predestroy 脚本未运行 heroku
- postgresql - Aws ecs 一致地读取/更新 postgres 记录
- javascript - 发布时输入 type="file" 数据为空
- python - 如何打印最大长度的字典键?
- java - 错误:您的 sql 语法有错误,请查看与您的 MariaDB 对应的手册以获取正确的语法
- r - 将给定日期更改为另一年的同一天和同一月的函数
- sql-server - AlwaysOn 侦听器端口配置
- java - 如何打印数组列表