Jump to content
xisto Community
kobra500

Help With Retractale Sidebar

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Edited by mikeyboy63 (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.