Skip to content

Instantly share code, notes, and snippets.

View davetayls's full-sized avatar

Dave Taylor davetayls

View GitHub Profile
@davetayls
davetayls / flickr.js
Created November 7, 2011 12:50
Flickr AMD Module
/*
* Flickr AMD Module
*/
/*jslint browser: true, vars: true, white: true, forin: true, indent: 4 */
/*global define,require */
define(
['jquery'],
function($){
'use strict';
@davetayls
davetayls / jquery.serializeObject.js
Created November 17, 2011 11:40
jQuery.serializeObject
/**
jQuery.serializeObject
http://stackoverflow.com/questions/1184624/serialize-form-to-json-with-jquery/1186309#1186309
*/
/*jslint browser: true, vars: true, white: true, forin: true */
/*global define,require */
(function($){
'use strict';
$.fn.serializeObject = function()
/*
Lighweight Concertina Plugin
<ul class="concertina">
<li>
<h2>header</h2>
<div>content</div>
</li>
<li>
<h2>header</h2>
<div>content</div>
/*
concertina
---------------------------------------------*/
.concertina {
clear: both;
margin: 12px 0 30px 0;
padding:0;
border-bottom:1px solid #d9d9d9;
}
.concertina:after {
@davetayls
davetayls / changetogreen.css
Created January 4, 2012 15:40
test for @import multiple times
h1 { color: green; }
@davetayls
davetayls / dabblet.css
Created February 17, 2012 13:50
Move in a circle without wrapper elements
/**
* Move in a circle without wrapper elements
* Idea by Aryeh Gregor, simplified by Lea Verou
*/
@keyframes rot {
from {
transform: rotate(0deg)
translate(-150px)
rotate(0deg);
@davetayls
davetayls / jquery.equalHeights.js
Created October 3, 2012 16:37
Equal heights reloaded with window resize
/**
 * Equal Heights Plugin
 * Equalize the heights of elements. Great for columns or any elements
 * that need to be the same size (floats, etc).
 *
 * Version 1.0
 * Updated 12/10/2008
 *
 * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com)
 *
@davetayls
davetayls / once.js
Created October 5, 2012 16:30
Once function
/**
* Once script to make sure a function is only run once!
*/
(function(global){
 
    function once(func) {
        var ran = false, memo;
        return function() {
            if (ran) return memo;
            ran = true;
@davetayls
davetayls / jquery.collapseContainer.js
Created October 10, 2012 16:49
simple jquery collapsible container plugin
/**
jQuery.collapseContainer v0.1
Dave Taylor http://the-taylors.org
@license The MIT License (MIT)
*/
/*global define,require */
(function($){
'use strict';
@davetayls
davetayls / index.html
Created January 4, 2013 11:24
A CodePen by Dave Taylor.
<div id="scene"></div>
<script id="world" type="text/x-tmpl">
<span class="box">
<i class="front"></i>
<i class="back"></i>
</span>
</script>