There might be some answers already to this question….or on the same lines.
I have a html form checkbox element which is unchecked by default and page load.
When clicked, I’m using Jquery to alter it’s attribute to checked or unchecked so other functions run as well.
Issue is how do I maintain this state, check or unchecked when browser is refreshed. I want it to retain value previosly or last selected. Trying to avoid cookie.
You should store the value in a cookie.
This plugin will do it all automatically.
If you don’t want to use a cookie, you could use HTML5 local storage.