1.0.0 • Published 7 years ago
rowselector v1.0.0
RowSelector
this is a jQuery plugin for selecting rows in a form and adding the value to an hidden input.
Requires
- jQuery 3.2.1 (tested)
- Bootstrap 3.3.7 (tested)
Usage
get some data
var cars = {
0: {
id: 1,
name: 'BMW'
},
1: {
id: 2,
name: 'Audi'
},
2: {
id: 3,
name: 'Porsche'
}
};
set up some basic html
<div id="car"></div>
<input type="hidden" id="car_hidden">
make an instance
$('#car').rowSelector(cars, $('#car_hidden'));
and it works!
more to come...
Not documented
- Preselect an item
- Reload the list
Future plans
- ...
1.0.0
7 years ago