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', |
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://nicolasgallagher.com/micro-clearfix-hack/ */ | |
.cf:before, | |
.cf:after { | |
content: " "; | |
display: table; | |
} | |
.cf:after { | |
clear: both; | |
} |
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 dfStripScripts = function(data, type) | |
{ | |
// incase the response is full html with scripts remove them | |
type = type || 'text'; | |
if(type=='html'||type=='text'){ | |
/*return data.replace(/<script.*>.*?<\/script>/gi, '');*/ | |
return data.replace(/<script.*?>([\w\W\d\D\s\S\0\n\f\r\t\v\b\B]*?)<\/script>/gi, ''); | |
} | |
return data; | |
}; |
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
/*! | |
* @author: Rhys Burnie [rb] | |
* | |
* MIT license | |
*/ | |
;(function($){ | |
$.fn.extend({ | |
/** | |
* .imgload |
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
<div id="stage"> | |
<div id="container"></div> | |
<a href="#">toggle animate</a> | |
</div> |
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
<div id="container"></div> | |
<code id="note">NB: this is just testing out shit not a demo of something - cheers</code> |
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
@mixin instrinsic-ratio($width, $height, $position: relative) | |
{ | |
@if unit($width) != unit($height) { | |
@warn "@include instrinsic-ratio-wrapper: $width and $height must share the same unit type, supplied was: #{$width} / #{$height}"; | |
} | |
$w: to-unitless($width); | |
$h: to-unitless($height); | |
$ratio: $h / $w; | |
$percent: $ratio * 100%; |
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() { |
OlderNewer