我有一个安装 SlickNav 的网站。我可以正确调用它,并且链接可以正常工作,但是它似乎不想在站点本身中进行初始化。我通过以下方式调用它:
<link rel="stylesheet" href="/wp-content/themes/mta360/dist/styles/slicknav.css" />
<script src="/wp-content/themes/mta360/dist/scripts/slicknav.js"></script>
菜单代码如下:
<header>
<!-- Header Start -->
<div class="header-area">
<div class="main-header ">
<div class="header-top top-bg d-none d-lg-block">
<div class="container">
<div class="col-xl-12">
<div class="row d-flex justify-content-between align-items-center">
<div class="header-info-left">
<ul>
<li>1234567890</li>
<li>mta360seo@gmail.com</li>
</ul>
</div>
<div class="header-info-right">
<ul>
<li>Mon - Fri: 9:00 - 5:00</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="header-bottom header-sticky">
<div class="container">
<div class="row align-items-center">
<!-- Logo -->
<div class="col-xl-2 col-lg-1 col-md-1">
<div class="logo">
<a href="index.html"><img src="/logo.png" alt=""></a>
</div>
</div>
<div class="col-xl-8 col-lg-8 col-md-8">
<!-- Main-menu -->
<div class="main-menu f-right d-none d-lg-block">
<nav>
<ul id="navigation">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Heating</a></li>
<li><a href="#">Cooling</a></li>
<li><a href="#">Press</a>
<ul class="submenu">
<li><a href="#">Blog</a></li>
<li><a href="#">Releases</a></li>
</ul>
</li>
<li><a href="#">Company</a>
<ul class="submenu">
<li><a href="#">Contact</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</div>
<div class="col-xl-2 col-lg-3 col-md-3">
<!-- Header-btn -->
<div class="header-btn d-none d-lg-block">
<a href="#" class="get-btn">Quote</a>
</div>
</div>
<!-- Mobile Menu -->
<div class="col-12">
<div class="mobile_menu d-block d-lg-none"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Header End -->
有什么我想念的吗?它适用于我的本地测试,但是当我编译并尝试在实际站点上使用它时,它根本不想初始化。有什么我想念的吗?
这是一个使用 Sage 9 的 wordpress 站点,以防有助于诊断。