InputPreloader for JavaScript
A simple input preloader to preload inputs on the web.
Installation
Yarn
$ yarn add input-preloader-js
NPM
$ npm install input-preloader-js
Usage
-
Assuming you have the following form inputs and id attributes
Text for radio -
Require the InputPreloader
var InputPreloader = ; -
Initialize the InputPreloader with your inputs and their input types
var inputs ="a-radio:radio""a-float:float""a-integer:integer""a-string:string";var preloader = inputs; -
Configure the InputPreloader to preload inputs on page load, and save inputs before moving away from the page.
preloader; -
That's it! Now the inputs will be preloaded everytime the page is loaded by the user.
-
In the case where you are done with the form, and doesn't need to preload the inputs anymore, call
deconfigure()
to remove all stored inputs.preloader;
Contributing
We'd love to accept your patches and contributions to this project! Checkout contributing and code of conduct to learn more.
License
Refer to the license file.