https://github.com/vanng822/jdatatable
Simple table renderer for data in json format
https://github.com/vanng822/jdatatable
Last synced: 23 days ago
JSON representation
Simple table renderer for data in json format
- Host: GitHub
- URL: https://github.com/vanng822/jdatatable
- Owner: vanng822
- Created: 2012-09-01T09:38:40.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-09-01T10:00:57.000Z (over 13 years ago)
- Last Synced: 2025-01-18T05:27:38.310Z (about 1 year ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##jdatatable
Simple table renderer for data in json format
## Usage example
config = {
td : {
className : {
first : 'table-body table-td-first',
middle : 'table-body table-td-middle',
last : 'table-body table-td-last'
}
},
th : {
className : {
first : 'table-header table-th-first',
middle : 'table-header table-th-middle',
last : 'table-header table-th-last'
}
},
listener : function(table) {
$(".link-button", table.getContainer()).button();
}
};
$.dataTable.create("id",
[{key:"name", label: "Name"}],
[{"name":"data"},{"name":"table"}],
config).render();
## methods create(sId, aColumns, aData, oConfig)
* `sId` Container id
* `aColumns` Array of object with properties key and label
* `aData` Array of object
* `oConfig` See example above