Dynamic inputs,
It is a library designed to generate dynamic fields for its prior assessment and data counting.
Usage
var options = {
id: "div_",
icon: "trash",
btn: ".bt_plus",
element: "materials",
addClass: "btn-danger",
removeClass: "btn-info",
};
$ (document) .addItem (options);- id: Is the identifier that we want to put to each of the dynamic fields (NOTE: "_" is not necessary).
- icon: Icon by which it will be replaced to remove the old line.
- btn: It would be the class or the id of our button to add fields.
- element: principal identifier of the first element / input.
- addClass: Class to add to the button (Currently used to change the color).
- removeClass: Class to remove from the button (Currently used to change the color).
Demo: https://quecodig.github.io/dynamic-inputs/
Changelog
= 1.3 =
- Bug correction
- The code is optimized
= 1.2 =
- Bug correction
- Classes are added to give styles
= 1.0 =
Initial release