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
/** | |
* EXAMPLE: | |
* Find external links and add class to them | |
* Except for exclusions | |
* $('a[href^="http"]').externallinks({ | |
* excludeOrigin: true, // also exclude the host site | |
* exclusions: ['urltoexclude.com'] | |
* }).addClass('external-link'); | |
*/ | |
(function($){ |
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
// 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 Moller. fixes from Paul Irish and Tino Zijdel | |
// sorry Erik the umlaut in your name was causing errors in most compilers so replaced it with "o" | |
// MIT license | |
(function() { | |
var lastTime = 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
(function() { | |
var lastScrollY = 0; | |
var ticking = false; | |
var update = function() { | |
// do your stuff | |
ticking = false; | |
}; | |
var requestTick = function() { |
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
// selectorSupported lovingly lifted from the mad italian genius, diego perini | |
// http://javascript.nwbox.com/CSSSupport/ | |
function selectorSupported(selector){ | |
var support, link, sheet, doc = document, | |
root = doc.documentElement, | |
head = root.getElementsByTagName('head')[0], | |
impl = doc.implementation || { | |
hasFeature: function() { |
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
/** | |
* @requires jQuery (which is on the fontawesome page already) | |
* | |
* I wrote this when we needed to create an array of available | |
* fontawesome classnames for a 'select icon' interface but | |
* didn't want to do it manually. | |
* | |
* What it does: | |
* | |
* Gets a comma seperated list of fontawesome classname strings |
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
/*! | |
* quantize.js Copyright 2008 Nick Rabinowitz. | |
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
// fill out a couple protovis dependencies | |
/*! | |
* Block below copied from Protovis: http://mbostock.github.com/protovis/ | |
* Copyright 2010 Stanford Visualization Group | |
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php |
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
/** | |
* Primarily for looping `querySelectorAll` results (`NodeList`) | |
* | |
* Avoid array hacks like: `[].forEach.call(NodeList)` | |
* see: http://toddmotto.com/ditch-the-array-foreach-call-nodelist-hack/ | |
*/ | |
+function(exports){ | |
// exposed on this global object | |
var exposed = 'notnative'; | |
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(exports){ | |
// exposed on this global object | |
var exposed = 'notnative'; | |
/**! | |
* @author Rhys Burnie | |
* @description native js coordinates tool for scripts consumption. | |
* @licence MIT | |
* Copyright Rhys Burnie | |
*/ |
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(typeof window!=="undefined"){ | |
window.Element && function(proto) { | |
if(!proto.matches) { | |
proto.matches = proto.matchesSelector || | |
proto.mozMatchesSelector || | |
proto.msMatchesSelector || | |
proto.oMatchesSelector || | |
proto.webkitMatchesSelector || | |
function (selector) { | |
var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1; |
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
/** | |
* makeShapeComposite function on a gloabl namespace - see var namespace | |
* | |
* ns.kineticSupport.makeShapeComposite(shape, operation); | |
* @param Kinetic.Shape (family) | |
* @param Sting - valid globalCompositeOperation name | |
* @return the supplied shape after globalCompositeOperation set | |
*/ | |
(function(){ | |
var namespace = 'myns', |
OlderNewer