The Bootstrap carousel is stuck and not moving

I'm really struggling to figure out why the bootstrap carousel code isn't working for me. It's frustrating because I followed the example on the bootstrap website and only made minor customizations, so it should be functioning properly. I suspect it might be an issue with the versions of bootstrap or jquery, but I have verified that both are up to date. If anyone has any insight or can offer assistance, please help! ^^

#carouselReactions {
  margin-top: 25px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  height: auto;
}

#carousel-left-control {
  width: 5%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#carousel-text {
  width: 50%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#carousel-text h3 {
    color: #0C0C0D;
}

.carousel-inner, .carousel-item {
  position: relative;
  text-align: center;
}

#carousel-right-control {
  width: 5%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-indicators {
  margin-top: 15px;
  padding: 0;
  float: none;
  position: relative;
}
.carousel-control-prev, .carousel-control-next {
  position: relative;
}
.carousel-control-next, .carousel-control-prev {
  width: 100%;
  height: 100%;
}
.carousel-control-prev-icon, .carousel-control-next-icon {
  height: 50%;
  width: 40%;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<div id="carouselReactions" class="carousel slide" data-ride="carousel">
  <div id="carousel-left-control">
    <a class="carousel-control-prev" href="#carouselReactions" role="button" data-slide="prev">
      <span class="carousel-control-prev-icon" aria-hidden="true"></span>
      <span class="sr-only">Previous</span>
    </a>
  </div>
  <div id="carousel-text">
    <div class="carousel-inner">
      <div class="carousel-item active">
        <h3>« First quote »</h3>
        <img src="img/logo_quote1.png">
        <p>QuoteAuthor</p>
      </div>
      <div class="carousel-item">
        <h3>Second Quote</h3>
        <img src="img/logo_quote2.png">
        <p>QuoteAuthor2</p>
      </div>
      <div class="carousel-item">
        <h3>Third Quote</h3>
        <img src="img/logo_quote3.png">
        <p>QuoteAuthor3</p>
      </div>
    </div>
  </div>

  <div id="carousel-right-control">
    <a class="carousel-control-next" href="#carouselReactions" role="button" data-slide="next">
      <span class="carousel-control-next-icon" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>
</div>

Answer №1

Simply update your reference CDN links as shown below to avoid any further issues.

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>

Answer №2

You are utilizing the carousel component from bootstrap-4 alongside bootstrap-3.

Below is an example of code for bootstrap 3:

<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.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="container">
  <h2>Carousel Example</h2>  
  <div id="myCarousel" class="carousel slide" data-ride="carousel">

    <div class="carousel-inner">
      <div class="item active">
        <img src="https://material.angular.io/assets/img/examples/shiba1.jpg"  style="width:100%;">
      </div>

      <div class="item">
        <img src="https://material.angular.io/assets/img/examples/shiba2.jpg" style="width:100%;">
      </div>
    
      <div class="item">
        <img src="https://material.angular.io/assets/img/examples/shiba1.jpg" style="width:100%;">
      </div>
    </div>

    <!-- Left and right controls -->
    <a class="left carousel-control" href="#myCarousel" data-slide="prev">
      <span class="glyphicon glyphicon-chevron-left"></span>
      <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#myCarousel" data-slide="next">
      <span class="glyphicon glyphicon-chevron-right"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>
</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

adjust variable increment in JavaScript

As I work on developing a Wordpress theme, I have encountered an issue with incrementing a load more button using Javascript. This is my first time facing this problem with a javascript variable, as I don't always use Wordpress. The variable pull_page ...

What strategies can be utilized to condense code when needing to adjust a className based on various props?

I am looking to condense this code, particularly the [if~else if] block, in order to dynamically change a className based on different props passed. export default function Button(props) { const { name, height, color, bgColor } = props; let className = ...

A function injected into a constructor of a class causes an undefined error

As I delve into learning about utilizing typescript for constructing API's, I have encountered a couple of challenges at the moment. Initially, I have developed a fairly straightforward PostController Class that has the ability to accept a use-case wh ...

Removing a row from a table using a button click in PHP

I am experiencing difficulty passing the ID of the button to delete the corresponding row. What steps should I take to ensure that the ID is passed correctly? <form method="POST" > <table border="1"> &l ...

attempting to retrieve a specific nested value using square brackets

I am attempting to track the position of an object associated with a particular row. Ultimately, I require a comprehensive object that includes both the row and the position of a "com" within that row. Below is my code snippet: (g represents a global objec ...

Convert HTML to PDF with just one click

I'm currently working on a website and I'm curious if there is a method to change HTML content into a PDF or Word document. Here's the scenario - Imagine a user finds information they like, then clicks a button to convert the specific page ...

Error: React Beautiful D&D is unable to retrieve dimensions when no reference is specified

Hey everyone! I'm currently working on a meta form creator and having some trouble with performance issues. I created a sandbox to ask for help, but keep getting the error message "Cannot get dimension when no ref is set" when trying to drag a second ...

Guide on implementing themes to HTML within the append() function

I am currently working on a project where I need to dynamically add HTML tags using JavaScript. However, I have noticed that the themes or styles are not being applied to the newly added elements within the append method. In my HTML file, I am using jQue ...

What is the best method for retrieving a JSON object in an AJAX response while utilizing a local .json file and jQuery

Can the jquery ajax request be used with a local json file to generate a response as a json object without the need for jQuery.parseJSON(data)? $.ajax({ url: 'mydata.json', type: 'get', error: function(data){ }, success: function(data) ...

How to target labels in CSS that end with a colon (*:)

Can CSS target labels that end with an asterisk and colon combination? Is this achievable? Let me elaborate further as per your request: Apologies if my explanation was not clear. I am working with an HTML label element that may end with an asterisk and ...

AngularJS scope refreshed following search form validation in Symfony2

Hey there, fellow developers! We are currently faced with the task of rewriting a software application in Symfony2 using AngularJS. We have chosen to utilize Symfony2 for its robust MVC capabilities and AngularJS for its powerful functions. Our current c ...

Unable to assign a value to a property that does not exist

Greetings, I have come across this Node.js code snippet where a find query with mongoose is being executed. router.post('/query',function(req,res,next){ if (req.body){ var result=[]; console.log(req.body.filters); Pol ...

Discovering the hovered time value on an input range slider

I realize that my question may have been a bit unclear, so I will provide a detailed explanation here. I am currently working on creating a simple video player for a webpage. I am using an input range element to display the file duration and current time, ...

Preventing file visibility in Three.js resource directory

Once a user clicks on a specific 3D model, I retrieve it from the server and render it in the browser using three.js. However, there is an issue when the user tries to access a model that is not free - they can easily view and download the STL file by go ...

Use jQuery to activate the radio button inside a div whenever it is triggered by a change

How can I check which radio button list is clicked and then send a jQuery ajax call for the clicked item? Currently, I have tables with the IDs plan1, plan2, plan3 generated using PHP. Each table has a radio button list. Using jQuery each, how can I achiev ...

Prevent tab key focus in jQuery UI autocomplete

Sharing my own answer here: Here is the HTML code I am working with: <select id="genre-select"> <option value="-1">Please select</option> <option value="1">One</option> <option value="2">Two ...

Clearing a textarea in jQuery

I'm experiencing an issue that I can't seem to resolve on my own. Any assistance would be greatly appreciated. My function designed to clear a textbox upon click doesn't seem to be working correctly: $(function() { $('textarea#co ...

Issue with model not triggering delete request upon destruction

sil is the deletion event, however it does not trigger the delete request method. var NoteModel = Backbone.Model.extend({ urlRoot:"/DenemeBackbone/webresources/com.mycompany.denemebackbone.note", defaults: { note: "Empty" } }); I am w ...

Styling a playbook using CSS Grid management techniques

Exciting to create a playbook layout style, here's how it goes: Name: Text starting here - unique style #1 text that moves to a new line with a different look - unique style #2 more text continuing on another new line ...

Creating a unique box design with HTML and CSS

Looking to create a design layout using HTML & CSS similar to the one shown in the screenshot below. While I've made progress up to this point, I am wondering if there is a way to adjust the elements as indicated by the red lines in the screenshot ...