![]() |
|
|
#1 |
|
Full-Time Underdog
Join Date: Jan 2006
Location: Hometown of the GOOD George W.
Posts: 26
|
For the latest redesign of my Agents Extraordinary site, I wanted to have one section of the page that would automatically slide back and forth horizontally, revealing different selections of links. (A bit like Panic Software's Coda page.) With some help from my genius brother, I finally got it working, at least in standards-compliant browsers. It was a bit of a pain, but it creates a cool effect, so I thought I'd share it with any interested parties.
First, the HTML. We're going to have three nested sets of divs -- a container that'll hold the whole thing and serve as its frame; a shifter that will slide back and forth within that frame; and the divs sitting inside that shifter, which will appear one at a time as the shifter slides back and forth: HTML Code:
Code:
Code:
Code:
EDIT: Fixed code for proper multi-pane sliding. -- Nato Last edited by Nato : 08-28-2007 at 11:21 PM. Reason: Fixing bad code. |
|
|
|
|
|
#2 |
|
Full-Time Underdog
Join Date: Jan 2006
Location: Hometown of the GOOD George W.
Posts: 26
|
Did I mention I was tired? In the HTML code, kindly switch the places of the "shiftleft" and "shiftright" links. We apologize for the confusion.
Yawn, Nato |
|
|
|
|
|
#3 |
|
Smooth Moderator
Join Date: Jan 2006
Posts: 898
|
Hey, Nato, I'm confused. I looked at both the Agents site and the referenced Coda site, and I can't figure out what effect this is supposed to represent. Did you implement it yet? Am I just incredibly website-illiterate tonight?
|
|
|
|
|
|
#4 |
|
Full-Time Underdog
Join Date: Jan 2006
Location: Hometown of the GOOD George W.
Posts: 26
|
It's not implemented yet on my site, because I don't have any "previous issues" for Series Two yet. When I do, the area that now is devoted entirely to Series One will slide over to reveal Series Two, and back again, upon the clicking of certain links.
On the Coda site, I'm talking about the way you can click the left and right arrows to make the content slide left or right. I used to have a handy one-file demonstration of all this, but then I, uh, deleted it. -- Nato |
|
|
|
|
|
#5 |
|
Full-Time Underdog
Join Date: Jan 2006
Location: Hometown of the GOOD George W.
Posts: 26
|
I can now confirm that the code above for a slider with multiple panes does work -- with one change. Because setWidth is a global variable, you don't need to return it. Instead, change
return setWidth; to: return false; at the end of each .click function. It works, and it's so very cool. -- Nato |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|