• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Collapsible Menus + Cookie settings

Electronic Punk

Staff member
Political User
Was very pleased and was looking at a way of integrating it into our headline block having told Neobond and Redmak that I loved it and was going to have to steal the idea. (gave em more to compensate)

Put it in my makeshift test theme:

(also had some other work done it on, been cleaning up the menus and changing a few things before I push it out to the other themes - clearing things up for some reason)

You can see the script in action at the top, but sadly for some reason it is
a) collapsed by default (bad)
b) doesn't save across sessions so remains collapsed.

This is the most suitable script I could find and I have been looking for a while.

Any cookie pro's why is this not working?

Collapse bit isn't final by the way, I just wanted to get it working.


I may actually be insane.
It's not remaining open/closed because no cookie is being set. ;)

And it's default to closed because of this
if (document.getElementById){
document.write('<style type="text/css">')
which, to me at least, seems a nasty way of doing it anyway.


I may actually be insane.
LordOfLA said:
Except it dont work in firefox (dont ask - i keep asking for .3 to be rolled out across active directory...)
Works fine in, and I doubt there were any major changes in the javascript engine between the two versions.

You sure you have JS enabled?


I may actually be insane.
cookified :p

Works for me in WebKit, Gecko and Opera (Can't test IE ;P).

The cookie could be a bit more refined, rather than setting it to a date in May 2100, but for simplicities sake, that's how I've done it in the example :D


I may actually be insane.
That seems to be a rather large script for such simple functionality.

Have changed it to only one link is showing now. Niff. :)

Electronic Punk

Staff member
Political User
Oooh spangley.
Any idea why its not working on the frontpage?

Trying to put them in a .js if I can which is called in the header tag, could be the problem.


I may actually be insane.
Yup, due to the way it interacts, the JS needs to be in the body, below the div/item we're collapsing. You can still call it via a .js, but it just needs to be below. :)

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member