When I change content of a site using toggle, or which ever other function, the state is not saved. So, if this is my page:
<div id='test'></div>
<input type='submit' value='test'>
<a href='http://www.stackoverflow.com'>link to elsewhere</a>
and this is in my ready-code:
$(':submit').click( function() {
$('#test').text( 'this is a test' );
});
when I click the submit button the div will be filled with 'this is a test'. When I follow the link to stackoverflow and click 'back' the DIV will be empty again. How can I make the DIV persistent when clicking to another page, much like in the way <input>
elements are persistent (ie. if I enter text in a <input type='text'/>
and follow the link that text will still be there when I click 'back')
Eventually I want to save the state of a toggle... or should I use cookies to solve this one, which means I have to write my own toggle functionality, which is not a big problem, but I'd rather not use cookies... people are still paranoid