This helper has finally been moved into a gem called nav_lynx!
https://github.com/vigetlabs/nav_lynx
http://rubygems.org/gems/nav_lynx
Thanks to @brianjlandau and @reagent for getting that set up and tested!
<!DOCTYPE html> | |
<!--[if lt IE 7 ]><html class="no-js ie ie6 lte6 lte7 lte8 lte9"><![endif]--> | |
<!--[if IE 7 ]><html class="no-js ie ie7 lte7 lte8 lte9"> <![endif]--> | |
<!--[if IE 8 ]><html class="no-js ie ie8 lte8 lte9"><![endif]--> | |
<!--[if IE 9 ]><html class="no-js ie ie9 lte9"><![endif]--> | |
<!--[if gt IE 9]><!--><html class="no-js"><!--<![endif]--> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> |
@mixin respond-to($query) { | |
@media only screen and #{$query} { | |
@content | |
} | |
} | |
//Responsive Sizes | |
$small: '(max-width: 480px)'; | |
$medium: '(max-width: 480px) and (max-width: 640px)'; |
/* Object that contains our utility functions. | |
* Attached to the window object which acts as the global namespace. | |
*/ | |
window.utils = {}; | |
/** | |
* Keeps track of the current mouse position, relative to an element. | |
* @param {HTMLElement} element | |
* @return {object} Contains properties: x, y, event | |
*/ |
// Full Blog Post: http://viget.com/extend/time-based-animation | |
// requestAnimationFrame() polyfill: https://gist.github.com/1579671 | |
window.APP = window.APP || {}; | |
APP.pause = function() { | |
window.cancelAnimationFrame(APP.core.animationFrame); | |
}; | |
APP.play = function() { |
/* | |
Check scroll position on a timer | |
Instead it's much better to use some form of a timer to check every X milliseconds OR to attach a scroll event and only run your code after a delay (or even after a given number of executions - and then a delay). | |
http://ejohn.org/blog/learning-from-twitter/ | |
*/ | |
var didScroll = false; | |
var handleScroll = function() { | |
if ( didScroll ) { | |
didScroll = false; |
/* | |
* 'Highly configurable' mutable plugin boilerplate | |
* Author: @markdalgleish | |
* Further changes, comments: @addyosmani | |
* Licensed under the MIT license | |
*/ | |
// Note that with this pattern, as per Alex Sexton's, the plugin logic | |
// hasn't been nested in a jQuery plugin. Instead, we just use | |
// jQuery for its instantiation. |
This helper has finally been moved into a gem called nav_lynx!
https://github.com/vigetlabs/nav_lynx
http://rubygems.org/gems/nav_lynx
Thanks to @brianjlandau and @reagent for getting that set up and tested!
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller | |
// fixes from Paul Irish and Tino Zijdel | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { |
// ====================================================================== | |
// Animation.scss | |
// - Contains helpers for keyframes animation in css3 | |
// - Only functionally with Sass 3.2.0 Alpha and Compass 0.13.alpha | |
// ====================================================================== | |
@mixin animation-name($name) { | |
-webkit-animation-name: $name; | |
-moz-animation-name: $name; | |
-ms-animation-name: $name; |