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
var $docEl = $( document.documentElement ), | |
$body = $( document.body ), | |
// if docEl has a scrollTop, well, that kinda answers our question | |
$scrollable = $docEl.scrollTop() ? $docEL : | |
$body.scrollTop( $body.scrollTop() + 1 ).scrollTop() ? $body : $docEl; | |
// its like we can already tell! | |
if ( windowST ) { | |
$scrollable = $docEl; |
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
<?PHP | |
/* | |
* PHP upload for Gyazo - v1.2 - 02/16/2011 | |
* http://benalman.com/news/2009/10/gyazo-on-your-own-server/ | |
* | |
* Copyright (c) 2009 "Cowboy" Ben Alman | |
* Licensed under the MIT license | |
* http://benalman.com/about/license/ | |
*/ |
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
/* | |
* Returns a 4 digit string of the time in hhmm format | |
* timeFrame will floor to the nearest multiple, e.g. | |
* fourDigitTime( 15, '', 2, 44 ); // returns "0230" | |
* hr and min will use the current time if not specified | |
* sep ( the separator between the hours and minutes ) defaults | |
* to an empty string ('') | |
* | |
* (c) Dan Heberden - danheberden.com | |
* https://gist.github.com/856911 |
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
// We override the animation for all of these color styles | |
jQuery.each("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color outlineColor".split(" "), function(i,attr){ | |
jQuery.fx.step[attr] = function(fx){ | |
if ( !fx.colorInit ) { | |
fx.start = getColor( fx.elem, attr ); | |
fx.end = getRGB( fx.end ); | |
fx.colorInit = true; | |
} | |
var rgb = []; |
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
/* | |
* .serializeObject (c) Dan Heberden | |
* danheberden.com | |
* | |
* Gives you a pretty object for your form bizniss | |
*/ | |
(function($){ | |
$.fn.serializeObject = function( trimKey ) { | |
if ( !this.length ) { return false; } | |
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
var Quewery = function( selector ) { | |
if( selector.match(/#[^\s]+$/) ) { | |
return [ document.getElementById( selector.substring(1) ) ]; | |
} else { | |
return document.querySelectorAll( selector ); | |
} | |
} |
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 getPrefix( prop ){ | |
var vendorPrefixes = ['Moz','Webkit','Khtml','O','ms'], | |
style = document.createElement('div').style, | |
upper = prop.charAt(0).toUpperCase() + prop.slice(1), | |
pref, len = vendorPrefixes.length; | |
while( len-- ){ | |
if((vendorPrefixes[len] + upper) in style){ | |
pref = (vendorPrefixes[len]); | |
} | |
} |
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
var getName = (function() { | |
var cache; // private cache | |
// gets assigned to getName | |
return function() { | |
// return the cache if it's valid or | |
return cache || $.ajax({ | |
url: 'srv/echo', |
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
getEl = (function (doc) { | |
var getElementsByClassName = (function () { | |
return doc.getElementsByClassName ? | |
function (selector) { | |
return doc.getElementsByClassName(selector.split('.').pop()); | |
} : function (selector) { | |
var parts = selector.split("."), |
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
<script type='text/javascript'><!--//<![CDATA[ | |
// wrap in an IIFE to not pollute the global name space - also allows 'document', etc, to be minified | |
(function( window, document ) { | |
document.MAX_used = document.MAX_used || ','; | |
// omitting http or https will use whatever is currently being used. | |
var m3_u = '//www.domain.com/openx/www/delivery/ajs.php?', | |
escape = window.escape, | |
// place the params into an array to be joined with the & later | |
params = [ 'zoneid=10', | |
'cb=' + Math.floor( Math.random() * +new Date() ), |
OlderNewer