This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Icon-Font Cheat Sheet | |
// Based on http://filamentgroup.com/lab/bulletproof_icon_fonts/ | |
// Non-Critical icon | |
// --- | |
// <a href="#"> | |
// <span class="icon-x" aria-hidden="true"></span> Menu | |
// </a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
evts = 'transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd'; | |
$menu.bind( evts, function() { | |
$menu.css('visibility', 'hidden'); | |
$menu.unbind( evts ); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
'backbone', | |
'jquery', | |
'underscore' | |
], function(Backbone, $, _) { | |
// x-browser window width test | |
function winWidth() { | |
var w = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input::-moz-focus-inner { | |
border: 0; | |
padding: 0; | |
margin-top:-2px; | |
margin-bottom: -2px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// … | |
.transition() | |
.delay(function(d, i) { | |
return i / dataset.length * 1000; // <-- Where the magic happens | |
}) | |
.duration(500) | |
// … |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--[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]--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkvisible( elm ) { | |
var vph = $(window).height(), // Viewport Height | |
st = $(window).scrollTop(), // Scroll Top | |
y = $(elm).offset().top; | |
// test if element is on screen or has been scrolled past | |
return (y < (vph + st)); | |
// test if element is on screen | |
// return (y > st) && (y < (vph + st)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::selection { | |
background: #000; | |
} | |
::-moz-selection { | |
background: #000; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Color format is #AARRGGBB where 'A' is alpha | |
background: rgba(0,0,0,0.3); | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#44000000,endColorstr=#44000000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addLoadEvent(func) { | |
var oldonload = window.onload; | |
if (typeof window.onload != 'function') { | |
window.onload = func; | |
} else { | |
window.onload = function() { | |
oldonload(); | |
func(); | |
} | |
} |
OlderNewer