Skip to content

Instantly share code, notes, and snippets.

@benmoss
Created March 25, 2011 15:18
Show Gist options
  • Save benmoss/887005 to your computer and use it in GitHub Desktop.
Save benmoss/887005 to your computer and use it in GitHub Desktop.
$(window).load(function() {
$(".carousel").each(function() {
id = "#" + $(this).attr("id");
$(id + " .carousel").jCarouselLite({
btnNext: id + " .next-gallery",
btnPrev: id + " .previous-gallery",
visible: 1
});
});
});
<div id="1" class='carousel'>
<ul>
<li>
<a href="#">
<img src="foto-op.jpg" />
</a>
</li>
<li>
<a href="#">
<img src="59453-10100255219345305.jpg" />
</a>
</li>
</ul>
<a href="#" class="previous-gallery">Previous Image</a>
<a href="#" class="next-gallery">Next Image</a>
</div>
<div id="2" class='carousel'>
<ul>
<li>
<a href="#">
<img src="59453.jpg" />
</a>
</li>
<li>
<a href="#">
<img src="59453.jpg" />
</a>
</li>
</ul>
<a href="#" class="previous-gallery">Previous Image</a>
<a href="#" class="next-gallery">Next Image</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment