This is in Joomla 3.1.1 with a Protostar template that is based on Bootstrap. I did not get a carousel for an automatic cycle. This worked for me:
Use custom html module, add this code: (change img
scr
text, text and subtitle text to customize)
<div id="myCarousel" class="carousel slide"> <ol class="carousel-indicators" style="list-style: none;"> <li class="active" data-target="#myCarousel" data-slide-to="0"></li> <li data-target="#myCarousel" data-slide-to="1"></li> <li data-target="#myCarousel" data-slide-to="2"></li> </ol> <div class="carousel-inner"> <div class="active item"> <img src="images/headers/maple.jpg" alt="imagetext 1" /> <div class="carousel-caption"> <h4>Exampletext 1</h4> </div> </div> <div class="item"> <img src="images/headers/raindrops.jpg" alt="imagetext 2" /> <div class="carousel-caption"> <h4>Exampletext</h4> </div> </div> <div class="item"> <img src="images/headers/windows.jpg" alt="imagetext 3" /> <div class="carousel-caption"> <h4>Exampletext</h4> </div> </div> </div> <a class="carousel-control left" href="#myCarousel" data-slide="prev">βΉ</a> <a class="carousel-control right" href="#myCarousel" data-slide="next">βΊ</a> </div> <script type="text/javascript"> (function($){$('.carousel').carousel({ interval: 5000, pause:'hover'}); })(jQuery); </script>
These adjustments in the index.php of your template are to prevent conflicts between scripts, it disables mootools, which causes the carousel to open and close before the slides:
// CSUTOM disable mootools-more.js unset (JFactory::getDocument()->_scripts['/jomaatcms/media/system/js/mootools-core.js']); unset (JFactory::getDocument()->_scripts['/jomaatcms/media/system/js/mootools-more.js']);
source share