Skip to content

Instantly share code, notes, and snippets.

var studentsTemplate2 ='<script id="students-template2" type="text/x-handlebars-template"><table><thead><th>Student Name</th><th>Special Skill</th><th>Email</th><th>Level</th></thead><tbody>{{#students2}}<tr><td>{{name}}</td><td>{{specialskill}}</td><td>{{email}}</td><td>{{level}}</td></tr>{{/students2}}</tbody></table></script>';
$(".content").append(studentsTemplate2);
var studentTemplateScript2 = $("#students-template2").html();
var theStudentTemplate2 = Handlebars.compile(studentTemplateScript2);
var data2 = { students2: [
{name: "Goku", specialskill: "Spirit Bomb", email: "goku@saiyan.com", level: "Over 9000" },
//code works on http://ast.codingthehumanities.com
var wishesButton = "<button type='button'>Click here for best wishes</button>"
$(".assignment").find("h1").append(wishesButton);
$('.assignment').on("click", "button", function() {
var message = ("<p>Good Luck!</p>");
$(this).after(message);
$(this).remove();