You could save the input values using cookies or HTML Web Storage. Then check your stored values when the page loads. HTML Web Storage is newer and IMO easier to work with.
There are 2 different types of web storage.
- window.localStorage - stores data with no expiration date
- window.sessionStorage - stores data for one session (data is lost when the browser tab is closed)
Basics
Web storage is stored in key/value pairs.
localStorage.setItem("lastname", "Smith"); // Store
document.getElementById("result").innerHTML = localStorage.getItem("lastname"); // Retrieve
localStorage.removeItem("lastname"); Delete
Its really that simple. Here is more info on HTML Web Storage. Basically all you need to do is create a web storage item for each of the items you want to save the state of. Then in your JS functions that show/hide items just update the state.
FYI
You can view local storage in chrome's toolbar by going to Application > Storage.
