.container.container-as-table {
display: table;
width: 100%;
border-collapse: collapse;
}
.container-as-table .row {
display: table-row;
}
.container-as-table .col {
display: table-cell;
}
var data = [
{id: 1, label: 'test'},
{id: 2, label: 'test1'},
{id: 3, label: 'test2'},
{id: 4, label: 'test3'},
{id: 5, label: 'test4'},
{id: 6, label: 'test5'}
];
$.each(data, function(key, value) {
var attr = $.extend(value, {
'id': 'id' + value.id,
'type': 'checkbox'
});
$('<input />').attr(attr).appendTo('body');
$('<label />').attr('for', attr.id).text('text' + (key || '')).appendTo('body');
});