# Script.aculo.us and Cookies?

**URL:** <https://forum.kirupa.com/t/script-aculo-us-and-cookies/201628>\
**Category:** web dev\
**Created:** [September 23, 2006, 5:31am UTC](https://forum.kirupa.com/t/script-aculo-us-and-cookies/201628 "2006-09-23T05:31:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![seth\_aldridge](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@seth\_aldridge](https://forum.kirupa.com/u/seth_aldridge)\
**Post date:** [September 23, 2006, 5:31am UTC](https://forum.kirupa.com/t/script-aculo-us-and-cookies/201628/1 "2006-09-23T05:31:05Z")

</div>

Hi,

I am trying to understand JavaScript and this is what I need help on.

Here is what we have:

I am using [Script.aculo.us](http://Script.aculo.us) to have our navigation drop down with the “toggle” method. And we are using a for SEO and accessibility reasons.

Here is what we need:

We need to add some JavaScript to the page that will set a cookie and keep the navigation at the state the user left it from page to page. I also need it to add a class to the link to give it a current state so the user can see the page they are on.

So what we have is a link from this site:  
[http://www.exit404.com/2005/57/unobtrusive-persistant-scriptaculous-effects](http://www.exit404.com/2005/57/unobtrusive-persistant-scriptaculous-effects)

It kind of what we need, but not working. Since the page is in toggle mode you have to set a \<div\> in the page and give it an ID to show it what you want to toggle. If you want it to start closed then you need to add style to the \<div\> do “display:none;” so rather than setting the BounceUp or Down we just need it to either add or remove the “display:none” based on what the user has clicked during there interaction.

I have virtually no experience with JavaScript other than what I can find on the web. I know what it needs to do in theory, but I don’t know the way to code it. Any help would be much appreciated.

Thanks,  
Seth
