- Include dist/index.js (or index.min.js)
- Run
$.tristateCheckboxGroup()
let master = $('input.chk-master');
let children = $();
$.tristateCheckboxGroup({
'checkbox': {}, // checkbox DOM object
'child': [{
'checkbox': {},
'child': [],
}],
});
See the test.html for example.
The data is a tree structure. Every element is of following structure:
{
'checkbox': {}, // checkbox DOM object
'child': [],
}
- jQuery
- Run
npm install
to install all dependencies - Make changes to the file in src folder
- Run
build
command - Open dist/test.html in browser
Generate the files in dist folder.
npm run build
Runs build as changes is made in files of src folder.
npm run watch
See package.json for available scripts