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 table = $('#users'); | |
var tbody = table.find('tbody'); | |
var nameField = $('#name'); | |
var emailField = $('#email'); | |
var addButton = $('#add'); | |
var clearAll = $('#clearAll'); |
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
<!doctype html> | |
<html> | |
<head> | |
<style> | |
body { | |
height: 4000px; | |
} | |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>Racecar</title> | |
<link rel="stylesheet" href="racecar.css"/> | |
</head> | |
<body> | |
<div class="container"> |
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
<html> | |
<head> | |
<style> | |
body { | |
background: #ccc; | |
} | |
.tab-wrapper { | |
width: 50%; |
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
<html> | |
<head> | |
<style> | |
body { | |
background: #ccc; | |
} | |
#container { |
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 num; | |
var guesses = 0; | |
function newGame(min, max) { | |
num = getRandomInt(min, max); | |
guesses = 0; | |
} | |
function guess(myGuess){ | |
guesses++; |
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 all_games = | |
[ [ [ 'X', 'X', 'X' ], | |
[ 'X', 'O', 'O' ], | |
[ 'X', 'O', 'O' ] ], | |
[ [ 'X', 'X', 'X' ], | |
[ 'X', 'O', 'O' ], | |
[ 'O', 'X', 'O' ] ], |
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
<html> | |
<head> | |
<style> | |
body { | |
padding: 0; | |
margin: 0; | |
} |
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
new Todo('todo'); | |
function Todo(id){ | |
this.items = []; | |
this.el = $(id); | |
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
// Add a handy super call for all objects | |
MyBaseClass.prototype.super = function () { | |
var parent = this.__proto__.__proto__; | |
var caller = arguments.callee.caller; | |
var fn; | |
if (caller.prototype === this.__proto__) { | |
return parent.constructor.apply(this, arguments); | |
} else { | |
// This is probably quite slow, but it doesn't seem to affect | |
// performance too much in real tests. |