I would like to understand how this works.
The jQuery carousel I would like to use is Elastislide.
http://tympanus.net/codrops/2011/09/12/elastislide-responsive-carousel/
The site gives us the code we need to use :
var carousel = $('#carousel').elastislide();
...
$('#carousel').append("<li><a href="#"><img src="images/10.jpg" alt="image03" /></a></li>");
carousel.add();
I also found those lines in the jquery.elastislide.js file but it's being ignored by /*
This is the HTML :
<div>
<div class="fixed-bar">
<!-- Elastislide Carousel -->
<ul id="carousel" class="elastislide-list">
<li><a href="http://www.site1.com"><img src="images/1.jpg" alt="img1" /></a></li>
<li><a href="http://www.site2.com"><img src="images/2.jpg" alt="img2" /></a></li>
<li><a href="http://www.site3.com"><img src="images/3.jpg" alt="img3" /></a></li>
<li><a href="http://www.site4.com"><img src="images/4.jpg" alt="img4" /></a></li>
</ul>
<!-- End Elastislide Carousel -->
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="js/jquerypp.custom.js"></script>
<script type="text/javascript" src="js/jquery.elastislide.js"></script>
<script type="text/javascript">
$( '#carousel' ).elastislide( {
minItems : 1
} );
</script>
The HTML obviously looks for all those items. But it's the javascript that decides what gets shown in the html, based on what's available, right ?
So my guess is the html needs to look like this before I do anything with it :
<!-- Elastislide Carousel -->
<ul id="carousel" class="elastislide-list">
</ul>
<!-- End Elastislide Carousel -->
And I need to add Javascript to it.
Otherwise how is it going to add list items like images and links ?
Can someone confirm this is correct ?
I don't think I'm done after that, I will need to add the path somewhere, probably in the javascript as well.
Otherwise how will it know in what folder it needs to look ?
To make matters more complicated (or maybe not), I'm trying to do this in Joomla.
I could install extensions that more or less do something similar than this carousel but I don't want to because all that comes down to is clicking buttons without really understanding it.
Thank you.