saltcod
saltcod

Reputation: 2031

Use jQuery cookie to remember menu position

I'm paginating a long menu — 5 or so items at a time.

http://jb.waterstreetgm.org/projects/fixed-height/

(The sidebar menu here)

The problem is that when I click Back / More and then click a link in the new list of 5, it forgets which list of 5 I was on.

I guess I need to use cookies somehow to remember where I was, but I don't even know where to get started. If someone could give me the basic idea of how I get started cookie-ifying this menu, I'd greatly appreciate it.

The code example I'm working from is here: http://jsfiddle.net/saltcod/bXKsZ/1/

Thanks for the help

Terry

Upvotes: 0

Views: 374

Answers (1)

Ken Wheeler
Ken Wheeler

Reputation: 1958

I would see this as an opportunity to use hash based history/navigation. Check this out:

https://github.com/cowboy/jquery-hashchange

That should get you started.

Upvotes: 1

Related Questions