02.06.2015 Views

Bootstrap Tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

$(function(){<br />

// Initializes the carousel<br />

$(".start-slide").click(function(){<br />

$("#myCarousel").carousel('cycle');<br />

});<br />

// Stops the carousel<br />

$(".pause-slide").click(function(){<br />

$("#myCarousel").carousel('pause');<br />

});<br />

// Cycles to the previous item<br />

$(".prev-slide").click(function(){<br />

$("#myCarousel").carousel('prev');<br />

});<br />

// Cycles to the next item<br />

$(".next-slide").click(function(){<br />

$("#myCarousel").carousel('next');<br />

});<br />

// Cycles the carousel to a particular frame<br />

$(".slide-one").click(function(){<br />

$("#myCarousel").carousel(0);<br />

});<br />

$(".slide-two").click(function(){<br />

$("#myCarousel").carousel(1);<br />

});<br />

$(".slide-three").click(function(){<br />

$("#myCarousel").carousel(2);<br />

});<br />

});<br />

<br />

Events<br />

<strong>Bootstrap</strong>'s carousel class exposes two events for hooking into carousel functionality which are listed in the<br />

following table.<br />

Event Description Example<br />

TUTORIALS POINT<br />

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!