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
/* | |
* .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
// 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
/* | |
* 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
<?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
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; |
NewerOlder