Skip to content

Instantly share code, notes, and snippets.

View joesteinkamp's full-sized avatar

Joe Steinkamp joesteinkamp

View GitHub Profile
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/iconsets/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
@joesteinkamp
joesteinkamp / index.html
Created August 16, 2012 15:40
iPad themed JS dropdown menu.
<a href="#" id="menuButton">Menu</a>
<ul id="iPadMenu" style="display:none;">
<li><a href="">Menu Item 1</a></li>
<li><a href="">Menu Item 2</a></li>
<li><a href="">Menu Item 3</a></li>
<li><a href="">Menu Item 4</a></li>
<li><a href="">Menu Item 5</a></li>
<li><a href="">Menu Item 6</a></li>
</ul>
@joesteinkamp
joesteinkamp / index.html
Created August 19, 2012 16:51
Android Holo CSS Menu List
<ul>
<li><a href="">Item One</a></li>
<li><a href="">Item Two</a></li>
<li><a href="">Item Three</a></li>
<li><a href="">Item Four</a></li>
<li><a href="">Item Five</a></li>
</ul>​
@joesteinkamp
joesteinkamp / index.html
Created August 19, 2012 16:55
iOS Menu List, CSS Only
<ul>
<li><a href="">Item One</a></li>
<li><a href="">Item Two</a></li>
<li><a href="">Item Three</a></li>
<li><a href="">Item Four</a></li>
</ul>​
@joesteinkamp
joesteinkamp / index.html
Created August 19, 2012 16:58
Border Radius: Cross Browser Syntax including Mobile with comments explaining CSS support.
<div id="example">
Hello!
</div>​
@joesteinkamp
joesteinkamp / script.js
Created August 19, 2012 17:12
Scroll Down to Hide Address Bar in Mobile Safari
/iPhone/.test(navigator.userAgent) && !location.hash && setTimeout(function () {
if (!pageYOffset) window.scrollTo(0, 1);
}, 1000);​
@joesteinkamp
joesteinkamp / script.js
Created August 19, 2012 17:13
Load Embedded CSS Styles Based on User Agent
// Add Style Tag to Head
var head = document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.id = 'newStyle';
head.appendChild(style);
var styles;
// Check if iPhone or iPod
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
@joesteinkamp
joesteinkamp / script.js
Created August 19, 2012 17:15
iOS Bookmarklet: Open with Google Chrome. Open a link in Mobile Safari in Google Chrome.
javascript:location.href=%22googlechrome%22+location.href.substring(4);
@joesteinkamp
joesteinkamp / Default (Windows).json
Last active October 9, 2015 02:48
My Sublime Text 2 Configuration
[
{ "keys": ["ctrl+b"], "command": "toggle_side_bar" },
{ "keys": ["f7"], "command": "build" }
]