More examples
You are now viewing this carousel:
HTML
<div id="wrapper"> <div id="carousel"> <img src="img/stan.jpg" width="700" height="525"/ > <img src="img/francine.jpg" width="700" height="525" /> <img src="img/roger.jpg" width="700" height="525" /> <img src="img/hayley.jpg" width="700" height="525" /> <img src="img/steve.jpg" width="700" height="525" /> <img src="img/klaus.jpg" width="700" height="525" /> </div> <a id="next" href="#"></a> </div>
JavaScript
$(function() {
$('#carousel').carouFredSel({
width: 800,
align: false,
items: {
visible: 1,
width: 700
},
auto: false,
next: '#next',
scroll: {
onBefore: function( data ) {
data.items.visible.animate({
'marginLeft': 0
}, data.scroll.duration);
},
onAfter: function( data ) {
data.items.old.css({
'zIndex': 0,
'marginLeft': -300
});
data.items.visible.css( 'zIndex', 2 );
data.items.visible.next().css( 'zIndex', 1 );
}
},
onCreate: function( data ) {
data.items.css({
'marginLeft': 0,
'zIndex': 2
});
data.items.next().css( 'zIndex', 1 );
}
});
});
CSS
html, body {
height: 100%;
padding: 0;
margin: 0;
}
body {
background-color: #eee;
min-height: 600px;
}
body * {
font-family: Arial, Geneva, SunSans-Regular, sans-serif;
font-size: 14px;
color: #333;
line-height: 22px;
}
#wrapper {
background-color: #fff;
width: 800px;
height: 525px;
padding: 10px;
margin: -265px 0 0 -410px;
position: absolute;
top: 50%;
left: 50%;
box-shadow: 0 0 10px #666;
}
#carousel {
width: 800px;
height: 525px;
overflow: hidden;
}
#carousel img {
border: none;
display: block;
margin-left: -300px;
float: left;
position: relative;
z-index: 0;
box-shadow: 0 0 10px #333;
}
#next {
background: url( img/gui-next.png ) center center no-repeat #999;
display: block;
width: 100px;
height: 525px;
position: absolute;
top: 10px;
right: 10px;
z-index: 5;
opacity: 0.1;
-o-transition: opacity 1s ease;
-ms-transition: opacity 1s ease;
-moz-transition: opacity 1s ease;
-webkit-transition: opacity 1s ease;
transition: opacity 1s ease;
}
#next:hover {
opacity: 0.5;
}
Description:
A cool example of a custom slideshow with a truncated preview of the next slide. The preview is truncated to show the center of the image, by animating the marginLeft property in the onBefore-callback function.
This carousel is created for your inspiration, using only the jQuery-library and the jQuery.carouFredSel-plugin.
you may use it for free in all of your projects.
Currently showcasing 72 cool carousels, so go ahead and pick one to view:
All carousels on this website are created for your inspiration, using only the jQuery-library and the jQuery.carouFredSel-plugin.
They have been tested to work on FireFox and Chrome.
Y O U R B R O W S E R I S O L D ,
U P D A T E I T !