Created
February 15, 2014 13:59
-
-
Save ABrouwer/9019671 to your computer and use it in GitHub Desktop.
This is the javascript, handlebars and jQuery for the second assignment of Art, Science and Technology
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(document).ready(function() {var studentTemplate ='<script id="student-template" type="text/x-handlebars-template"><table><thead><th>First Name</th><th>Last Name</th><th>Student Number</th><th>Email Address</th></thead><tbody>{{#student}}<tr><td>{{first name}}</td><td>{{last name}}</td><td>{{student number}}</td><td>{{email address}}</td></tr>{{/student}}</tbody></table></script>';$(".content").append(studentTemplate);var studentTemplateScript = $("#student-template").html();var theStudentTemplate = Handlebars.compile(studentTemplateScript);}); | |
| jQuery(document).ready(function() {var assignmentTemplate ='<script id="assignment-template" type="text/x-handlebars-template"><table><thead><th>Number </th><th>Pass or Fail</th><th>General Feedback</th><th>Further Reading</th></thead><tbody>{{#assignment}}<tr><td>{{number}}</td><td>{{ pass or fail }}</td><td>{{ general feedback }}</td><td>{{ further reading }}</td></tr>{{/assignment}}</tbody></table></script>';$(".content").append(assignmentTemplate);var assignmentTemplateScript = $("#assignment-template").html();var theAssignmentTemplate = Handlebars.compile(assignmentTemplateScript);}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment