Skip to content

Instantly share code, notes, and snippets.

@kaleb
kaleb / designer.html
Created July 10, 2014 20:03
designer
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="kzh-typeahead">
<template>
<style>
:host {
position: absolute;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
@kaleb
kaleb / .gitmodules
Last active August 29, 2015 14:05
Example Parent Repo
[submodule "sub"]
path = sub
url = git@gist.github.com:/cce0551e8ce7f1856196.git
@kaleb
kaleb / README.md
Created August 27, 2014 11:48
Example Submodule

This is my example git submodule.

@kaleb
kaleb / README.md
Created December 4, 2014 02:46
This is a test. Please ignore.

Shoot me now.

@kaleb
kaleb / component-binding.html
Last active August 29, 2015 14:16
Knockout.js Custom Elements
<!DOCTYPE html>
<meta charset="utf-8">
<ul>
<li><a href=".">custom element</a></li>
<li><b>component binding</b></li>
<li><a href="template-binding.html">template binding</a></li>
</ul>
<hr />
<div data-bind="component: 'custom-element'">custom element loading...</div>
@kaleb
kaleb / README.md
Last active August 29, 2015 14:19
KO Component With foreach Binding

Purpose

I would like to be able to have a Knockout custom component that can have either static content or dynamic content using the foreach binding.

view demo

@kaleb
kaleb / StrictModeTest.js
Created March 4, 2011 03:28
Tests JavaScript Strict Mode Support
var isStrictModeSupported = (function(){"use strict";return !this}());
@kaleb
kaleb / table.html
Created April 5, 2011 20:02
HTML 5 Table Example
<!DOCTYPE html>
<title>HTML 5 Table Example</title>
<table>
<caption>This is a table</caption>
<thead>
<tr>
<th>number
<th>value
<tfoot>
<tr>
@kaleb
kaleb / dom-checkbox-label-test.js
Created April 17, 2011 15:15
Detect and fix leaky labels for disabled inputs
var lbl = document.createElement('label'),
chk = document.createElement('input'),
proto, lblOnClick;
chk.type = 'checkbox';
chk.disabled = true;
lbl.appendElement(chk);
lbl.click();
if (chk.checked) {
// Labels need to be fixed
proto = Object.getPrototypeOf(lbl);