Carousel is not autoplay and is not available (Bootstrap 3)

Yes, I'm going crazy. I spent days on this site, while others tried different pieces of code.

When I look through jsfiddle, everything is fine. But on my site it does not start automatically, and I can’t press the navigation buttons. Help!

Live website here: www.zjscreations.com

<section>
 <script>
  $(function() {
    $('#myCarousel').carousel({
       interval: 2000
    });
});
</script>
 <div id="myCarousel" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
    <li data-target="#myCarousel" data-slide-to="1"></li>
    <li data-target="#myCarousel" data-slide-to="2"></li>
    <li data-target="#myCarousel" data-slide-to="3"></li>
  </ol>

  <!-- Wrapper for slides -->

   <div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="images/Hanna Edens Headshot - Alki Beach.jpg" alt="Hanna Edens Heashot - Alki Beach" class="img-responsive">
    </div>
    <div class="item">
      <img src="images/Stella Salsbury - Dog Portrait.jpg" alt="Stella Salsbury - Dog Portrait" class="img-responsive">
    </div>
    <div class="item">
      <img src="/images/Hanna Edens Headshot - Seattle Skyline.jpg" alt="Hanna Edens Heashot - Seattle Skyline" class="img-responsive">
    </div>
  </div>

  <!-- Left and right controls -->

 <a class="carousel-control left" href="#my_carousel" data-slide = "prev">
    <span class="icon-prev left"></span>
  </a>

  <a class="carousel-control right" href="#my_carousel" data-slide = "next">
    <span class="icon-next right"></span>
  </a>
</div>
</section>
+4
source share
3 answers

, jQuery , , , , . url jQuery js.

Screenshot from your site indicating the exact error:

+1

jQuery, . script .

, , OP ( byronyasgur!), , - , , . ( , , / )

<script>
  jQuery(document).ready(function () {
    jQuery('#myCarousel').carousel(
    {
    interval:2000
    });
});

jQuery('#myCarousel').carousel();
</script>
0

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
0

Source: https://habr.com/ru/post/1665200/


All Articles