jquery slider to scroll a div with dynamic image sizes
April 22, 2011 by Creart · Leave a Comment
Usually the class .content-item has the width parameter defined so you can easily set the #content-holder width with the exact size, but what if you want to use all images with different width size ?
This worked for me.
var t = 0;
$('#content-holder .content-item').each(function() {
t += $(this).outerWidth( true );
$('#content-holder').css('width', t + 20);
$('#content-holder .content-item').each(function() {
t += $(this).outerWidth( true );
$('#content-holder').css('width', t + 20);
For the complete script go here


