Skip to content

Instantly share code, notes, and snippets.

View hansent's full-sized avatar

Thomas Hansen hansent

View GitHub Profile

Uncaught TypeError: elem.nodeName.toLowerCase is not a

As soon as I click on the page, I get the follwing error: Uncaught TypeError: elem.nodeName.toLowerCase is not a function

It fails inside shouldUseChangeEvent, which looks as follows:

function shouldUseChangeEvent(elem) {
  var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
  return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
@hansent
hansent / README.md
Last active December 16, 2015 09:12

#Todo

##General

  • crop/optimize and insert images from PSD ~0.5d
  • hookup login/signup dialog for CTA in footer (form w/ shoes) ~0.5d

##Product Page

  • interface overview (animations & responsive layout) ~1d

##About page

#Todo

##General

  • crop/optimize and insert images from PSD ~0.5d
  • hookup login/signup dialog for CTA in footer (form w/ shoes) ~0.5d

##Product Page

  • interface overview (animations & responsive layout) ~1d

##About page

@hansent
hansent / index.php
Created November 14, 2014 17:26
blackjack
<?php
$player_hand = array();
$dealer_hand = array();
//init and shuffle deck of cards
$deck = glob('cards/*.png');
shuffle($deck);
//give two cards to player and dealer each
<html>
<head>
<title>Creating MySQL Tables</title>
</head>
<body>
<?php
$dbhost = 'localhost:3036';
$dbuser = 'root';
$dbpass = 'rootpassword';
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
@hansent
hansent / email.txt
Created November 10, 2014 18:20
php intro
thomas@fresklabs.com
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Thank You</title>
</head>
<body>
<h1>Thank you!</h1>
<?
$email = $_GET['email'] . "\n";
var $ = require('jquery');
//global variable to keep track of ongoing touches
var ongoingTouches = {};
$(function() {
var el = document.body;
WEB
browser
DOM
events
html/css
rendering
html5 api's (canvas, etc)
server
http
@hansent
hansent / index.html
Created June 4, 2014 21:19
bootstrap example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>bootstrap sample</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">