I found this nifty image slider: http://tympanus.net/codrops/2011/09/12/elastislide-responsive-carousel/
Since im developing an events site with this design: my webpage design, i would love to add multiple (3) sliders on one page. I am new to jquery so its difficult to edit the jquery code so it can identify multiple lists on the html for rendering the carousel.
<!-- Elastislide Carousel rendering on html-->
<ul id="carousel" class="elastislide-list">
<li><a href=""><img src="images/small/1.jpg" alt="image01" /></a></li>
<li><a href="#"><img src="images/small/2.jpg" alt="image02" /></a></li>
<li><a href="#"><img src="images/small/3.jpg" alt="image03" /></a></li>
<li><a href="#"><img src="images/small/4.jpg" alt="image04" /></a></li>
<li><a href="#"><img src="images/small/5.jpg" alt="image05" /></a></li>
<li><a href="#"><img src="images/small/6.jpg" alt="image06" /></a></li>
</ul>
Here the script:
<script type="text/javascript">
$( '#carousel' ).elastislide( {minItems : 2} );
</script>
Someone please help me out!!!!
Good solution if you want to have 2 different sliders with their own navigations but if you want to have a single navigation and control both sliders, here is quick snippet that will help you solve it. Hide the elastislide default buttons using display:none like so
Add your own custom navigation:
In the elastislide js:
Add the following to _addControls : function() {
That'll help you slide 2 sliders with one click creating a really nice effect of grid carousel.
just use class instead of id,like below one
javascript code
use short one like this
Found a solution by working with different ids and calling each separately as shown below:
javascript code
I used class instead of id, but still no. 2 slider did not work. However, using jquery each, it worked: