so i have made several attempts at this, but decided i needed some advice from the community regarding best practices. here is what i am trying to do.
i have multiple elements in multiple views that i am using jquery toggles to show or hide them. what i want to do is save the state of them so they are persistant accross requests. (ie, if a user has panel1 showing, but panel2 hidden, when they refresh, they remain that way)
i was thinking each time a user toggles an element, i could save that element's css display value in a session. then after each page load, i could use jquery's .class selector to get all the elements with a class of say 'toggle' and apply that to those elements.
the idea seems sound, but i am not savvy enough to pull it off. i am not sure how to execute the javascript, and have it parse the ruby code, other than having an ajax call a .js.erb for that view.
i have played around with it for hours, with no success. does anyone have any suggestions that would get me started in the right direction?