jquery – Bootstrap Slider in Django is not working-ThrowExceptions

Exception or error:

<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>

<div class="item active ">

  <img src="{% static 'imgs/pic1.jpg' %}" alt="Bank1">

</div>

<div class="item">
    <img src="{% static 'imgs/pic2.jpg' %}" alt="Bank2">

</div>

<div class="item">

  <img src="{% static 'imgs/pic3.jpg' %}" alt="Bank3">

</div>

Slider does not work it shows only pics, I want slider I’m using Django framework.
I just made this bootstrap slider and it’s perfect but in my scenario, it’s not working it just shows me pictures which I included in the slider, but slider not working !!!

How to solve:

This should ideally for work you. You must place the images in an appropriate Bootstrap class for images to be seen in the slider.

<div id="carouselExampleSlidesOnly" class="carousel slide" data-ride="carousel">
  <div class="carousel-inner">
     <div class="carousel-item active">
        <img class="d-block w-100" src="{% static 'imgs/pic1.jpg' %}" alt="First slide">
     </div>
     <div class="carousel-item">
        <img class="d-block w-100" src="{% static 'imgs/pic2.jpg' %}" alt="Second slide">
     </div>
     <div class="carousel-item">
        <img class="d-block w-100" src="{% static 'imgs/pic3.jpg' %}" alt="Third slide">
     </div>
  </div>
</div>

Leave a Reply

Your email address will not be published. Required fields are marked *