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 assignm |
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
alert(localStorage.getItem('assignment')); | |
var Rawdataset = [{"events":[ | |
{"name":"sint", "rating":3,"ficticious":false}, | |
{"name":"dolore tempor","rating":4, "ficticious":false}, | |
{"name":"id", "rating":4, "ficticious": true}, | |
{"name":"est","rating":3, "ficticious":false}, | |
{"name":"incididunt Ut", "rating":3, "ficticious": false}, | |
{"name": "dolore aute", "rating": 1, "ficticious": false}, | |
{"name":"veniam in", "rating": 3, "ficticious": false}, |
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
var dataset = []; | |
d3.json("https://negativepostdata.firebaseio.com/#", | |
function(d) | |
{return dataset = d;}); | |
JSON.parse(dataset) | |
var w = 500; | |
var h = 200; | |
var barPadding = 1; |
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
// append validation plugin | |
$(".content").append('<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>'); | |
function update (data) { | |
//Creating an SVG element | |
var w = 500; | |
var h = 200; | |
var barPadding = 1; |
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
d3.json('https://astportfoliodata.firebaseio.com/.json', function(data) { | |
console.log(data); //Log output to console | |
//Width and height | |
var w = 500; | |
var h = 100; | |
//Create SVG element |
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
$(document).ready(function () { $("a").css({"color": "black"});}); | |
$(document).ready(function () { $("a").on("click", function() { $(this).css({"color": "green"});});}); |
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
$(function(){ | |
var headings = $("section.assignment > h1"); | |
var paragraphs = $("p"); | |
paragraphs.not(":first").hide(); | |
headings.on("mouseover", function(){ | |
var t = $(this); | |
var tPara = t.next(); | |
if(tPara.is(":visible")){ | |
return; |
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
var studentsTemplate2 ='<script id="students-template2" type="text/x-handlebars-template"><table><thead><th>Student Name</th><th>Hours of coding</th><th>Grade</th></thead><tbody>{{#students2}}<tr><td>{{name}}</td><td>{{hoc}}</td><td>{{grade}}</td></tr>{{/students2}}</tbody></table></script>'; | |
$(".content").append(studentsTemplate2); | |
var studentTemplateScript2 = $("#students-template2").html(); | |
var theStudentTemplate2 = Handlebars.compile(studentTemplateScript2); | |
var data2 = { students2: [ | |
{name: "Student 01", hoc: "30", grade: "6.5"}, |
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
localStorage.getItem('assignment'); // <-- getting assignments from local storage | |
JSON.parse(localStorage.getItem('assignment')); // <-- parsing data | |
//creating dataset | |
var eventsJSON = localStorage.getItem('assignment'); | |
var events = JSON.parse(eventsJSON).events; | |
var data = events; | |
//creating w/h/padding |
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
var dataset = [ | |
[30, 6.5], | |
[34, 8.5], | |
[10, 5 ], | |
[38, 9 ], | |
[22, 6.5], | |
[20, 7 ], | |
[25, 8 ], | |
[10, 8 ], | |
[17, 7.5], |
OlderNewer