Skip to content

Instantly share code, notes, and snippets.

@pcote
Created August 23, 2016 23:03
Show Gist options
  • Save pcote/3ea6d8b1a68c45005f39edc8a7540b02 to your computer and use it in GitHub Desktop.
Save pcote/3ea6d8b1a68c45005f39edc8a7540b02 to your computer and use it in GitHub Desktop.
var deleteButton = makeDeleteButton(rec.id);
var changeButton = makeChangeButton(rec.id, rec.title, rec.detail);
var rowData = {
id: rec.id,
title: rec.title,
detail: rec.detail
};
var rowTemplText = $("#notesRowTempl").html();
var rowTemplate = Handlebars.compile(rowTemplText);
var renderedRowText = rowTemplate(rowData);
var renderedRowDom = $(renderedRowText);
renderedRowDom.find(".deleteButtonCell").append(deleteButton);
renderedRowDom.find(".changeButtonCell").append(changeButton);
// notesTable.append(row);
notesTable.append(renderedRowDom);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment