每次我在 script.js 中的 glide js 东西在刷新项目页面后被加载并且在访问时不会加载。
<div class="showcase">
<div class="glide">
<div class="glide__track" data-glide-el="track">
<ul class="glide__slides">
<li class="glide__slide">
<img src="./1.PNG" alt="" />
<div class="text_area">
<h3>Responsive Clibboard Landing Page</h3>
<span>Built an responsive simple landing Page</span>
<br />
<a href="https://clipboardlanding.now.sh/" target="_blank"
>Visit Now...</a
>
</div>
</li>
<li class="glide__slide">
<img src="./Capture.PNG" alt="" />
<div class="text_area">
<h3 class="text_put">
Responsive, Dynamic Portfolio Website
</h3>
<span class="text_put"
>Designed, built & mantaining the website for a Professional
Logo Designer.</span
>
<br />
<a href="https://logodesigner.vercel.app/" target="_blank"
>Visit Now...</a
>
</div>
</li>
<li class="glide__slide">
<img src="./2.png" alt="" />
<div class="text_area">
<h3>Desktop Friendly Landing Page</h3>
<span>Built an simple landing page for desktop</span>
<br />
<a
href="https://single-price-grid-component-liart.now.sh/"
target="_blank"
>Visit Now...</a
>
</div>
</li>
</ul>
</div>
<div class="glide__arrows" data-glide-el="controls">
<button class="glide__arrow glide__arrow--left" data-glide-dir="<">
<i class="fa fa-angle-left"></i>
</button>
<button class="glide__arrow glide__arrow--right" data-glide-dir=">">
<i class="fa fa-angle-right"></i>
</button>
</div>
</div>
</div>
这是我的代码的链接 https://codepen.io/nileshaggarwal/pen/ZEpJMrJ
上面的代码是 glide.js 部分,在访问项目页面链接时需要执行。并且 javascript 文件只需要与 html 文件一起执行。包含指向 javascript 文件、css 文件和完整 html 文件的链接。