jQuery rowTool
Dynamically add rows to a table from a Qty. input
Here's the job: you need to dymically add a whole bunch of rows to a table, based on a qty. input box. You don't want to write the same 100 lines of code all the time.
Here's the solution: use this plugin!
This plugin will automatically ensure that the rows are added and removed from the table.
Limits can be placed (min
and max
values on the qty. input box)
You can add rows on the server side, this plugin will not clobber them.
Usage
-
Include jQuery:
-
Include plugin's code:
-
Write the HTML:
How many things do you want?<!-- build a template for the rows... --><!-- and add a table that we will modify! -->IDNick nameFirst nameLast name -
Call the plugin:
Structure
The basic structure of the project is given in the following way:
├── demo/
│ └── index.html
├── dist/
│ ├── jquery.rowtool.js
│ └── jquery.rowtool.min.js
├── src/
│ └── jquery.rowtool.js
├── .editorconfig
├── .gitignore
├── .jshintrc
├── .travis.yml
├── Gruntfile.js
└── package.json
demo/
Contains a simple HTML file to demonstrate the plugin.
License
Software is licensed under the MIT License
.
© Vonex, 2016