jQuery Horizontal scroll with unknown width of items
Posted
by Gorm Casper
on Stack Overflow
See other posts from Stack Overflow
or by Gorm Casper
Published on 2010-05-20T13:03:33Z
Indexed on
2010/05/20
13:50 UTC
Read the original article
Hit count: 188
I am creating a gallery using jQuery which displays pictures horizontally, with a "left" and "right" button below, that scrolls the row of images. There are plenty of tutorials and plugins for this.
The problem for me though, is that 1) I don't know the width of the images. And 2) I need the item I scroll to, to be centered.
How do I go about this?
Thanks a lot, Gorm
© Stack Overflow or respective owner