|
Project Information
Featured
Downloads
|
simple.carouselThis is a simple jQuery plugin for creating sliding carousels. Demo/Examples:
Insert following in the head part of your html page: <script type="text/javascript" src="javascript/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="javascript/simple.carousel.0.3.js"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
// initialize carousel
$("#carousel").simplecarousel({
next: $('.next'),
prev: $('.prev'),
slidespeed: 700,
auto: 5000,
width: 480,
height: 280
});
});
</script> This will change following html structure <ul id="carousel"> <li>erster Frame (z.B. ein Bild)</li> <li>zweiter Frame (z.B. ein Bild)</li> <li>dritter Frame (z.B. ein Bild)</li> <li>vierter Frame (z.B. ein Bild)</li> ... </ul> into a slider
Parameters
Example$("#carousel").simplecarousel({
next: $('.next'),
prev: $('.prev'),
auto: 4000,
fade: 400
});Will create a carousel with fadein/fadeout effect. The pause between two frames will be 4 seconds, the speed of the fade effect will be 400 ms, the element with the class 'next' will be the next button (the same with 'prev' for back button). See download for further examples. |