alfajango / jquery-dynatable

A more-fun, semantic, alternative to datatables
http://www.dynatable.com
Other
2.77k stars 363 forks source link

How do I select a row and get the data for it? #228

Open OscarGodson opened 8 years ago

OscarGodson commented 8 years ago

I'm having a hard time figuring out how to get data from a row. Some other table plugins I'm comparing have the ability when you click on a row to get that row's data. Is that possible on this? Right now I'm doing this manual thing:

    $table.on('click', 'tr', function () {
      var data = [];
      $(this).find('td').each(function (i, el) {
        data.push($(el).html());
      });
      console.log(data);
    });