Timeline for Saving JQuery Toggle State on Home Page Component
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 1, 2014 at 13:54 | vote | accept | Matt Santy | ||
Apr 1, 2014 at 7:43 | answer | added | Abhinav Gupta | timeline score: 1 | |
Apr 1, 2014 at 6:56 | answer | added | SFIntegrator | timeline score: 0 | |
Mar 31, 2014 at 22:49 | comment | added | Matt Santy | I've tried a couple cookie-based approaches, namely importing jquery.cookie like so: <script src="raw.githubusercontent.com/carhartl/jquery-cookie/master/…>, and then trying to set the cookie here: <script> $("#button").click(function () { $("#toggle").toggle("blind"); $.cookie("toggle-state", $("#toggle").is(':visible'), {expires: 1, path:'/'}); }); </script, but no luck. Any insights on how to make this work with the code? | |
Mar 31, 2014 at 22:34 | comment | added | Boris Bachovski | Before even reading the comments I would've suggested a cookie too. | |
Mar 31, 2014 at 19:33 | comment | added | greenstork | Cookie is totally viable too, hence my comment and not an answer. | |
Mar 31, 2014 at 19:28 | comment | added | Matt Santy | If a cookie would suffice, then there is no requirement to store the state to the database. | |
Mar 31, 2014 at 19:15 | comment | added | Mark Pond | Do you have a requirement to store the state of the toggle as data in salesforce or would a cookie with the toggle state suffice? | |
Mar 31, 2014 at 18:51 | comment | added | Matt Santy | Thanks @greenstork. Can you provide a little more detail? | |
Mar 31, 2014 at 18:43 | comment | added | greenstork | JS Remoting method that saves some "state" variable to the user object. | |
Mar 31, 2014 at 18:32 | history | asked | Matt Santy | CC BY-SA 3.0 |