example/highlight.js
function buildTable(tbody, data) {
  tbody.empty();
  data.forEach(function(item) {
    var row = $('<tr>').appendTo(tbody);
    $('<td>').appendTo(row).text(item.price);
    $('<td>').appendTo(row).text(item.weight);
    $('<td>').appendTo(row).text(item.taste);

    // Associate underlying data with row node so we can access it later
    // for filtering.
    row.data('item', item);
  });
}
function buildTable(tbody, data) {
  tbody.empty();
  data.forEach(function(item) {
    var row = $('<tr>').appendTo(tbody);
    $('<td>').appendTo(row).text(item.price);
    $('<td>').appendTo(row).text(item.weight);
    $('<td>').appendTo(row).text(item.taste);

    // Associate underlying data with row node so we can access it later
    // for filtering.
    row.data('item', item);
  });
}
function buildTable ( tbody , data ) { tbody . empty ( ) ; data . forEach ( function ( item ) { var row = $ ( '<tr>' ) . appendTo ( tbody ) ; $ ( '<td>' ) . appendTo ( row ) . text ( item . price ) ; $ ( '<td>' ) . appendTo ( row ) . text ( item . weight ) ; $ ( '<td>' ) . appendTo ( row ) . text ( item . taste ) ; // Associate underlying data with row node so we can access it later // for filtering. row . data ( 'item' , item ) ; } ) ; }
Build table on page with items.
Build table on page with items .