jquery slider to scroll a div with dynamic image sizes

April 22, 2011 by · 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);

For the complete script go here

About Creart

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

*