Hey all,
I'm trying to set up a website using HTML and JavaScript that displays sections of an image at a time and, by clicking buttons or sections of the image, will scroll to a different section of the image.
|-----| |-----| |-----|
|--A-| |--B-| |--C-|
|-----| |-----| |-----|
If an image if formed by the concatenation of A, B and C, I want to display only one section, A B or C, at a time, and by clicking a button, scroll to display the one to the left or the right. So if B is displayed, and I click a button inside B, I want the browser to scroll to the right, displaying C.
I think I can do this by having the three images next to each other, far enough apart that the one to the other side will not show, and use javascript to hide the scroll buttons, and then use javascript to scroll to the html anchor that specifies the location of the image.
However, I'm having trouble getting the images to be off screen. If my little scheme is to work, I need to put A off screen to the left, and C offscreen to the right. How can I do this through HTML? Can I do this through HTML? Is there a better way to get the functionality I want?
Thanks!