The Twitter Bootstrap carousel fails to pause when hovered over

Code:

<html>
<head>
    <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap.no-icons.min.css" rel="stylesheet">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js"></script>        
    <script>
      $(document).ready(function(){
        $('#welcome-carousel').carousel({
          interval: 5000,
        });
      });
    </script>
</head>

<body><div style="width:600px;margin:auto;">
    <div id="welcome-carousel" class="carousel slide"><!-- class of slide for animation -->
      <div class="carousel-inner">
        <div class="item active"><!-- class of active since it's the first item -->
          <img src="img/image1.png" alt="" />
        </div>
        <div class="item">
          <img src="img/image4.png" alt="" />
        </div>
        <div class="item">
          <img src="img/image3.png" alt="" />
          <div class="carousel-caption">
            <p>Hello to the WORLD!</p>
          </div>
        </div>
        <div class="item">
          <img src="img/image2.png" alt="" />
        </div>
        <div class="item">
          <img src="img/image1.png" alt="" />
        </div>
      </div><!-- /.carousel-inner -->
      <!--  Next and Previous controls below
            href values must reference the id for this carousel -->
        <a class="carousel-control left" href="#welcome-carousel" data-slide="prev">&lsaquo;</a>
        <a class="carousel-control right" href="#welcome-carousel" data-slide="next">&rsaquo;</a>
    </div>
    </div>
    <p>hey</p>
</body>

When I move my cursor over the slideshow, it doesn't pause. Why might that be?

Answer №1

Attempt this solution for your situation:


$(document).ready(function(){
    $('#welcome-carousel').carousel({
        interval: 5000,
        pause: "hover"
    });
});

Refer to the documentation here:

Answer №2

Recently, a glitch was discovered in the bootstrap 2.2.1 carousel where it fails to pause when hovered over during a slide/transition. More details on this problem can be found at https://github.com/twitter/bootstrap/issues/5747

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

Bootstrap 4 fails to adapt on mobile devices, causing columns to pile on top of each other

My website is optimized for desktop viewing, but I'm struggling to make it responsive on mobile using bootstrap 4. Even though my custom columns have always worked in the past, they are now overlapping on top of each other instead of stacking correct ...

I need to update a JSON file on the server by adding a new object to the existing array using the fs.appendFile function

I have a JSON stored on the server like this: [{"a":1}, {"a":2}] and I'm wondering if there is a way to add an object at the end without having to rewrite the entire file on the server. As a workaround, I have been omitting the brackets and adding the ...

Delete the generated thumbnails from the input JavaScript file

One issue I'm facing is that I have written JavaScript code to generate a thumbnail when a user uploads an image. Now, I would like to implement a feature that allows the user to click on an "X" button to delete the uploaded image. This is the existi ...

Unable to display texture and color on .obj files in Three.js

After introducing a new model in .obj and .mtl formats into my three.js code, I encountered an issue where the color of the model would turn white, regardless of its original color or texture. Below is a snippet of the code related to the pig model: // ...

Is there a way to direct to a particular section of an external website without relying on an id attribute in the anchor tag?

I am aware that you can link to specific id attributes by using the following code: <a href="http://www.external-website.com/page#some-id">Link</a> However, what if the external HTML document does not have any ids to target? It seems odd tha ...

Unable to navigate to a page following selection of a radio button

I have set up HTML code for two radio button options. When the user selects an option and clicks submit, it is supposed to redirect them to the corresponding page. <script src="js/jump.js"></script> <form onsubmit="jump()"> <input ty ...

Modify the color of a particular column within a data table

I'm currently working on customizing the color scheme for default Datatables. While I successfully changed the header color and font, I'm facing a challenge with changing the color of individual columns. Specifically, I have a column that display ...

core.js encountered an issue at line 6210: TypeError - The function this.service.addDepartment does not exist

Whenever I attempt to click the 'Add' button on a web application that I'm constructing, an error pops up. core.js:6210 ERROR TypeError: this.service.addDepartment is not a function at AddEditDepComponent.addDepartment (add-edit-dep.componen ...

Decoding Japanese file names using JavaScript in Visual Studio Code

Currently, I am on MacOS 12 using VS Code. An issue arises when I choose a file with a Japanese filename and try to output it to the console: File.openDialog(); $.writeln(file.name); Unfortunately, when this happens, the Japanese characters disappear and ...

Spin: twist beyond 360 degrees or less than 0 degrees

Attempting to rotate an arrow indicating wind direction using the transform: rotate() property. The data for rotation is retrieved from an API fetch, and conventional measurement of wind direction involves indicating where the wind is coming from. Therefo ...

Initiate the Bull Queue Process upon launching the Application

As I develop my API, I am setting up a queue and adding jobs to it. Additionally, I have configured the API to start processing these jobs as soon as they are added. const newQueue = createQueue(queueName, opts); newQueue.add('JokesJob', data, o ...

An odd error is being thrown by the remove function of the Redux-form field array

Let's consider this scenario: I am working with an array of objects that I am displaying using Redux Form Field Array. Here is a sample structure: [{ index: 0, overlapRecord: '127.0.0.1' }, { index: 1, overlapRecord: ...

Scaling and mapping textures onto meshes using Three.js TextureLoader

I have a cube and I'm attempting to project an image onto it. I am using a loading Manager to load the image, but I am encountering an issue where material.map is showing as undefined. I suspect that there may be a problem with scaling. The original i ...

Having trouble transmitting Django template array variable through post method back to the view

I am currently working on creating basic Django templates where I pass a Django template variable that is an array - {{array_list}}. I have no issues performing operations on this variable. However, I am facing difficulties sending this variable back to th ...

I implemented a proxy in my project to handle cross-domain requests, however, the requested address changes when I make a

Unable to Cross Domains http://localhost:8080/api/login has to be redirected to http://localhost:8080/index.html proxyTable: { '/api': { target: 'http://47.106.74.67:8080', changeOrigin: true, pathRewrite: ...

index.ts import statement results in undefined value being returned

I have a simple file structure set up like this: src index.ts services my-service.ts In index.ts, I have the following code: export const a = 3 And in my-service.ts, I use the following import statement: import { a } from '../index' consol ...

Issue encountered while utilizing Multer with Node.js to upload file to server

I'm encountering an issue where the server is unable to receive an image that I'm trying to send. Despite configuring everything with multer, the image doesn't go through and I'm unsure of what the problem might be. The error message I ...

I am curious to know why my jQuery when().then() function is firing before the completion of the ajax request in the when clause

I have a situation where I need to set an async callback because a function is fetching content from a remote location. Here's what I am currently doing: $.when( priv[box.view.renderWith](content, box.view.gadget_id) ).then(function(late) { conso ...

Which hook should be implemented for automatically updating stock levels after a successful payment on WooCommerce?

When working with WooCommerce, I have implemented my own custom payment method using javascript code. I have successfully retrieved the total amount and passed it to my payment system using the following PHP code: <?php $GLOBALS['cart_total'] ...

How can I set a limit for the number of matches in jQuery :

$("div:contains(' 1434')").parent().addClass('date'); Instead of adding the class to ALL divs, I need to limit it to just the element that contains the specific text directly. While using class/id selectors would be helpful, the HTML s ...