Prevent your users' hard-earned text from disappearing if they leave the page.
$("#my-form").stayAlive();
That's really it. Each form element on the page requires an
ID for the persistence to work. If you don't want to persist
every input on a form, you can also call
stayAlive
on an individual input element.
If you need additional control, stayAlive
accepts an options object:
window.location.pathname
)
Type text in the form below, and then reload the page. You won't have lost anything! Submitting the form clears the stored values.