text is not active during page loading

First of all, javascript is not java :). Also, I dont think this is a matter of your javascript. Take a look at your image source. The first one contains a url while the other two only contains a local image. This means that this problem comes from you image location. Fixing methods:

  1. Try changing it into the correct path from your local directory.
  2. Change all of them into url images just like the first one.

Like this for example:

 var slideIndex = 1;
  showSlides(slideIndex);

  function plusSlides(n) {
    showSlides(slideIndex += n);
  }

  function currentSlide(n) {
    showSlides(slideIndex = n);
  }

  function showSlides(n) {
    var i;
    var slides = document.getElementsByClassName("mySlides");
    var dots = document.getElementsByClassName("dot");
    if (n > slides.length) {
      slideIndex = 1
    }
    if (n < 1) {
      slideIndex = slides.length
    }
    for (i = 0; i < slides.length; i++) {
      slides[i].style.display = "none";
    }
    for (i = 0; i < dots.length; i++) {
      dots[i].className = dots[i].className.replace(" active", "");
    }
    slides[slideIndex - 1].style.display = "block";
    dots[slideIndex - 1].className += " active";
  }
 *{
    box-sizing: border-box
  }

  .mySlides {
    display: none
  }

  img {
    vertical-align: middle;
  }

  /* Slideshow container */
  .slideshow-container {
    max-width: 1000px;
    position: relative;
    margin: auto;
  }

  /* The dots/bullets/indicators */
  .dot {
    cursor: pointer;
    height: auto;
    width: auto;
    margin: 0 2px;
    color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: color 0.6s ease;
  }

  .active,
  .dot:hover {
    color: #cc3333;
  }

  /* Fading animation */
  .fade {
    -webkit-animation-name: fade;
    -webkit-animation-duration: 1.5s;
    animation-name: fade;
    animation-duration: 1.5s;
  }

  @-webkit-keyframes fade {
    from {
      opacity: .4
    }

    to {
      opacity: 1
    }
  }

  @keyframes fade {
    from {
      opacity: .4
    }

    to {
      opacity: 1
    }
  }

  /* On smaller screens, decrease text size */
  @media only screen and (max-width: 300px) {

    .prev,
    .next,
    .text {
      font-size: 11px
    }
  }
<div style="border-top: 6px solid #cc3333;padding-bottom: 100px; padding-top: 100px" class="row highlight-phone">
  <div class="container">
    <div class="vidrow">
      <div class="vidcolumn slideshow-container">
        <div id="slide1" class="mySlides">
          <img src="https://www.w3schools.com/howto/img_nature_wide.jpg" style="width:100%">
        </div>
        <div class="mySlides">
          <img src="https://www.w3schools.com/howto/img_snow_wide.jpg" style="width:100%">
        </div>
        <div class="mySlides">
          <img src="https://www.w3schools.com/howto/img_mountains_wide.jpg" style="width:100%">
        </div>
      </div>
      <div class="vidcolumn">
        <div class="intro">
          <h2 style="text-decoration:overline;text-decoration-color: #cc3333;">How It Works</h2>
          <div id="dot" class="dot" onclick="currentSlide(1)">Learning Paths</div>
          <br>
          <span id="dot" class="dot" onclick="currentSlide(2)">Songs</span>
          <br>
          <span id="dot" class="dot" onclick="currentSlide(3)">Training</span>
          <br>
          <br>
          <br>
          <a class="btn btn-primary btn-lg btn-wi-red btn-pill" role="button" href="#">VIEW DEMO</a>
        </div>
      </div>
    </div>
  </div>
</div>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top