ContinousJs
Micro plugin to store (form) values on change
The basic thought behind this micro library is that a user shouldn't have only a good UX but also a continuous UX - meaning that inserted data should be continuous usable and stored. So this plugin enables you to do so easily.
Requirements
- local storage
Advantages
- ~ 2KB
- without jQuery
- easy-to-use
Usage
- Require script
- Add Form & add on each element that should be "continuous" a
data-cont
attribute with the name of the property as value
e.g
- Initialize lib
var cont = ; cont; // ADDITIONAL - reset the store to be empty and reload the value bindingcont; // ADDITIONAL - remove an property from the storage - NO RELOAD OF VALUE BINDING
-
- Change the referenced fields and reload the page & see how data stays :)
Info
password
fields are NOT stored under no circumstanced even if thedata-cont
attribute is set, for security reasons.- the lib isn't necessarily limited to form element, if your element supports a
oninput
callback it also can be made continuous