Skip to content

Instantly share code, notes, and snippets.

View al-the-x's full-sized avatar

David Rogers AKA "AL the X" al-the-x

View GitHub Profile
$(document).ready(function() {
$('#new-todo').on('keypress', function(event) {
// If the "Enter" key is pressed...
if (event.which == 13) {
//append to the <ul>
var inputVal = $('#new-todo').val();
// Grab the value of the `#new-todo` <input> element...
var newTask = // Use this template...
(function (window) {
'use strict';
// Your starting point. Enjoy the ride!
    $(document).ready(function(){
$('#new-todo').on('keypress', function (e) {
if(e.which == 13) {
var newTask = $('#new-todo').val();
console.log(newTask);
var newItem =
var todoList = [
{ 'completed': false, 'name': 'thing 1' },
{ 'completed': true, 'name': 'thing 2' },
]
function addTaskToList(list, task){
// Add `task` to `list`
list.push(task);
}
$(document).ready(function() {
var userData = $.getJSON("https://api.github.com/users/adamkarb");
userData.done(function(user) {
$("#myname").html(user.name);
$("#myusername").html(user.login);
$("#created").html(user.created_at);
$("#email").html(user.email);
$("#location").html(user.location);
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
$(document).ready(function() {
var TOKEN = 'SUPER_LONG_STRING';
var API = _.template('https://api.forecast.io/forecast/${token}/${coords.lat},${coords.lon}');
$('#fullpage').fullpage();
/**
* @param Object coords with { lat: Number, lon: Number }
*/
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">