简体   繁体   English

在JavaScript插件中包含页脚

[英]Include footer with with javascript plugin

So i Included a footer into index.html and i have the footer.html file. 所以我在index.html中包含了一个页脚,并且我有footer.html文件。 The only issue is that I use the tippy tool tips plugin and it works in the footer when i have the footer without the include function but when i include it the plugin does not work anymore. 唯一的问题是,我使用了Tippy工具的提示插件,并且当我具有不包含include功能的页脚时,它可以在页脚中工作,但是当我包含它时,该插件将不再起作用。

    <script>
$(function(){
  $("#footer").load("footer.html"); 
});
</script>


<div id="footer"></div>

<div class="footer-copyright">
            <span>&copy; 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>

Move the tippy tool invocation to after the loading 加载后将Tippy工具调用移至

For example 例如

$(function(){ 
  $("#footer").load("footer.html",function() { tippy('#footer') }); 
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM