Jump to content

Menu that holds state


seventheyejosh

Recommended Posts

Hello all i'm needing to make a menu that holds its state throughout the page clicks.

 

So all options start with a class of closed. when the page is changed tho i need any of the ones that were open to be auto assigned the open class when the page loads.

 

I posted here cause i figured you guys might now of a jquery menu system that'll help me. Or if you can give me a really simple javascript chunk.

 

all i need is onclick run a function that makes a cookie called, say menu-id_of_item then when the page loads just do like an if isset... class = open. i dont need the actual value of the cookie i dont think. just if its set.

Link to comment
https://forums.phpfreaks.com/topic/159876-menu-that-holds-state/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.