Bootstrap -KontrollkastentabelleJquery

JQuery-Programmierung
Anonymous
 Bootstrap -Kontrollkastentabelle

Post by Anonymous »

Ich habe die folgende Bootstrap -Tabelle. Ich möchte das Kontrollkästchen ausgewählt, aber wenn ich auf die Schaltfläche klicke, funktioniert es nicht.
Hier ist meine Tabelle: < /p>



Get Selections






Name
Stars
Forks





< /code>

Und hier ist mein JavaScript: < /p>


$(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")));
});
});
});
< /code>

Wie kann das Kontrollkästchen Auswahl erhalten? < /p>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post