Ad

Carousel Bootstrap Version 3.3 Does Not Rotate

I have the following problem: I want to implement a Carousel with Bootstrap version 3.3.7 on my website. The code looks like this:

<!-- Carousel
================================================== -->
<div class="row dark-start d-none d-lg-block">
  <div class="col-md-12">
    <div id="categoryExampleSlider" class="carousel slide" data-ride="carousel">
      <!-- Indicators -->
      <ol class="carousel-indicators">
        <li data-target="#categoryExampleSlider" data-slide-to="0" class="active"></li>
        <li data-target="#categoryExampleSlider" data-slide-to="1"></li>
        <li data-target="#categoryExampleSlider" data-slide-to="2"></li>
        <li data-target="#categoryExampleSlider" data-slide-to="3"></li>
        <li data-target="#categoryExampleSlider" data-slide-to="4"></li>
        <li data-target="#categoryExampleSlider" data-slide-to="5"></li>
      </ol>
      <div class="carousel-inner" role="listbox">
        <div class="item active">
          <img src="../imgs/slider1_sport.jpg" alt="sport">
        </div>
        <div class="item">
          <img src="../imgs/slider2_outdoor.jpg" alt="outdoor">
        </div>
        <div class="item">
          <img src="../imgs/slider3_senioren.jpg" alt="ass">
        </div>
        <div class="item">
          <img src="../imgs/slider4_ass.jpg" alt="ass">
        </div>
        <div class="item">
          <img src="../imgs/slider5_risiko.jpg" alt="risiko">
        </div>
        <div class="item">
          <img src="../imgs/slider6_rettervideo.jpg" alt="rettervideo">
        </div>
      </div>
      <a class="left carousel-control" target="_blank" rel="nofollow noreferrer" href="#categoryExampleSlider" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
      </a>
      <a class="right carousel-control" target="_blank" rel="nofollow noreferrer" href="#categoryExampleSlider" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
      </a>
    </div><!-- /.carousel -->
  </div>
</div>

The controls and the indicators are displayed but it does not rotate. Neither automatically nor when I click on the controls and/or indicators.

What am I doing wrong here?

Ad

Answer

Try with bootstrap 3.4.0 version. You need to change the version. It absolutely works. This example is useful for u.

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" target="_blank" rel="nofollow noreferrer" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>
    <div class="row dark-start d-none d-lg-block">
        <div class="col-md-12">
            <div id="categoryExampleSlider" class="carousel slide" data-ride="carousel">
                <ol class="carousel-indicators">
                    <li data-target="#categoryExampleSlider" data-slide-to="0" class="active"></li>
                    <li data-target="#categoryExampleSlider" data-slide-to="1"></li>
                    <li data-target="#categoryExampleSlider" data-slide-to="2"></li>
                    <li data-target="#categoryExampleSlider" data-slide-to="3"></li>
                    <li data-target="#categoryExampleSlider" data-slide-to="4"></li>
                    <li data-target="#categoryExampleSlider" data-slide-to="5"></li>
                </ol>
                <div class="carousel-inner" role="listbox">
                    <div class="item active">
                        <img src="public/images/1.svg" alt="sport">
                    </div>
                    <div class="item">
                        <img src="public/images/1.svg" alt="outdoor">
                    </div>
                    <div class="item">
                        <img src="public/images/1.svg" alt="ass">
                    </div>
                    <div class="item">
                        <img src="public/images/1.svg" alt="ass">
                    </div>
                    <div class="item">
                        <img src="public/images/1.svg" alt="risiko">
                    </div>
                    <div class="item">
                        <img src="public/images/1.svg" alt="rettervideo">
                    </div>
                </div>
                <a class="left carousel-control" target="_blank" rel="nofollow noreferrer" href="#categoryExampleSlider" role="button" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                    <span class="sr-only">Previous</span>
                </a>
                <a class="right carousel-control" target="_blank" rel="nofollow noreferrer" href="#categoryExampleSlider" role="button" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>
        </div>
    </div>
</body>
</html>
Ad
source: stackoverflow.com
Ad