Skip to content

Instantly share code, notes, and snippets.

View StephenFiser's full-sized avatar

Stephen Fiser StephenFiser

View GitHub Profile
$(document).ready(function() {
$('#new-to-do-item').keyup(function(e) {
if (e.which === 13) {
var text = $(this).val();
var listItem = "<li><input type='checkbox'>" + text + "</li>"
$('ul').append(listItem);
}
});
$('input[type="checkbox"]').click(function() {
console.log(this);
<!doctype html>
<html>
<head>
<title>Hello!</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="./my_stuff.js"></script>
</head>
<body>
<h1>Hello World!</h1>
<div>
$(document).ready(function() {
listenForChecks();
// Event Listeners
$('#new-to-do-item').keyup(function(e) {
if (e.which === 13) {
var text = $(this).val();
var listItem = "<li><input type='checkbox'>" + text + "</li>"
class Dog
def bark
"Ruff"
end
def walk
"walking..."
end
class Dog
def initialize(name, size)
@name = name
@size = size
end
def bark
"Ruff"
end
class Dog
def initialize(name, size)
@name = name
@size = size
end
def bark
"Ruff"
end
<html>
<head>
<title>Learning CSS</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="first" class="content">
<h1>Hello everyone</h1>
<h3>Here is some less important text.</h3>
<p>Here is some text about nothing really.</p>
body {
background-color: green;
}
h1, h3, p {
font-family: Arial, sans-serif;
color: #3a3a3a;
}
#first h1 {
color: #60F3FF;
font-style: italic;
}