Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get template
- var partition_attribute_row = $.ajax({type: "GET", url: '/include/mustache/partition_attribute_row.mustache', async: false}).responseText;
- // Parse
- var html = $.parseHTML( partition_attribute_row );
- // Get the columns
- html.col_1 = html[0].cells[0].innerHTML;
- html.col_2 = html[0].cells[1].innerHTML;
- html.col_3 = html[0].cells[2].innerHTML;
- // When the add row button is clicked..
- var addRow = function() {
- counter ++;
- t.api().row.add( [
- Mustache.render( html.col_1, { counter: counter } ),
- Mustache.render( html.col_2, { counter: counter } ),
- Mustache.render( html.col_3, { counter: counter } )
- ] );
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement