Вот моя таблица:
Код: Выделить всё
Get Selections
Name
Stars
Forks
Код: Выделить всё
$(document).ready(function(){
$("#table-methods").next().click(function () {
$(this).hide();
var id = 0,
getRows = function () {
var rows = [];
for (var i = 0; i < 10; i++) {
rows.push({
id: PatName,
name: 'test' + PatName,
price: '$' + PatName
});
id++;
}
return rows;
},
// init table use data
$table = $("#table-methods-table").bootstrapTable({
data: getRows()
});
$("#get-selections").click(function () {
alert("Selected values: " + JSON.stringify($table.bootstrapTable("getSelections")));
});
});
});
Подробнее здесь: https://stackoverflow.com/questions/279 ... kbox-table