Why Glightbox is not showing in index?


This Content is from Stack Overflow. Question asked by 32 denka

When I try to open my index file, the video I’ve put there is not opening. When I open the site with liver server though it works and the video is showing just fine.

I can’t figure out, why in index only it doesn’t show, but in live server it works?

<a href="#" class="glightbox position-absolute top-50 start-50 translate-middle">
    <i class="fas fa-play-circle"></i>
  <span class="border-animation border-animation--border-1"></span>
  <span class="border-animation border-animation--border-2"></span>
const lightbox = GLightbox({
  href: "https://youtu.be/7lJPlgkduw4",
  type: "video",
  source: "youtube", //vimeo, youtube or local
  width: 900,
  autoPlayVideos: "true",


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?