Honesty Rocks! truth rules.

Help With Retractale Sidebar

HOME      >>       Programming

kobra500

Hey, I want to create a retractable sidebar whose default position is in with just a button poking out the screen. When opened I want it to go on top of other div layers. I also want it to stay opened or closed depending on wether it was open or closed on the previous page.I have no idea what to do, I assume JS so maybe this post should be there but I dont think java should be with JS.Thx to anyone who helps


Live-Dimension

It's not that hard. You make the panel, when the page loads, it puts the panel to the right off-screen (This means that anyone without javascript should be able to use the panel). You then click the button, and javascript simply moves the panel's X in enough for it to display. Press the button again, it goes off the screen.

I also want it to stay opened or closed depending on wether it was open or closed on the previous page.

This is the tricky part. You could use GET/POST, maybe a cookie?
I can't help you with the code sorry - but there's the theory work done :D

mikeyboy63

Sorry I don't have the answer exactly, but I know there are several Javascripts available for free at dynamicdrive.com that'll get you going in the right direction, at least. I'm sure I've seen scripts for the retractable sidebar there.