Skip to content Skip to sidebar Skip to footer

Bootstrap Carousel Controls Not Working

twitter bootstrap carousel not working. I tried changing the id ('#mycarousel') to .carousel or .mycarousel but nothing is working. when I click on the controls it does not advance

Solution 1:

The following code will never gets executed, since you never actually call it.

$('#mycarousel').carousel();

You should change the following:

function(){
    $('#mycarousel').carousel();
}

to:

$(function(){
    $('#mycarousel').carousel();
});

This will make it execute when the dom is ready.

You also do not close you link tag that loads the bootstrap css from being loaded.The following:

<link rel="stylesheet" type="text/css" href="css/bootstrap.css"

Should be:

<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />

You load the JS files in an order which I am not sure if it is correct. I suppose they should be in the reverse order.


Post a Comment for "Bootstrap Carousel Controls Not Working"