D
D
Denis2019-02-03 20:21:12
Bootstrap
Denis, 2019-02-03 20:21:12

Bootstrap 4 slider not working, what's wrong?

I do everything according to the documentation from their website, I even took it from there

$('.carousel').carousel({
  interval: 2000
})

here is the slider code, it is elementary
<div id="carouselExampleSlidesOnly" class="my-carousel slide" data-ride="carousel">
            <div class="carousel-inner slide-block">
              <div class="carousel-item active">
                  <img src="img/bass-guitar-1841186_1920.jpg" class="d-block w-100 img-fluid" alt="guitar">
              </div>
              <div class="carousel-item">
                <img src="img/guitar-2216068_1920.jpg" class="d-block w-100 img-fluid" alt="guitar">
              </div>
              <div class="carousel-item">
                <img src="img/guitar-2925274_1920.jpg" class="d-block w-100 img-fluid" alt="guitar">
              </div>
            </div>
          </div>

and still the error
5c5722f064fb6884428544.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BJlaDuMup, 2019-02-03
@BJlaDuMup

Bootstap Documentation:
The data-ride="carousel" attribute is used to create a carousel animation. It cannot be combined with explicit carousel initialization via JavaScript.
Try removing data-ride="carousel"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question