Skip to content

Instantly share code, notes, and snippets.

View darkwing's full-sized avatar

David Walsh darkwing

View GitHub Profile
<div id="fellows" data-url="/fellows">
<!-- list of fellows -->
</div>
var Templatizer = new Class({
Implements: [Options, Events],
options: {
templates: {
/*
name: instanceOfSubtleTemplate
*/
},
data: {}
},
['get', 'post', 'put', 'delete'].each(function(method){
methods[method] = methods[method.toUpperCase()] = function(){
var params = Array.link(arguments, {url: String.type, data: $defined});
return this.send($extend(params, {method: method}));
};
});
/* digitarald's, before */
for (var i = 0, selector; (selector = parsed[i]); i++) {
var locate = locateCurrent;
if (selector.first) {
if (!results) locate = locateFast;
if (iterate) nodes = context;
else if (selector.combinator) nodes = [context]; // allows combinators before selectors
/*
Script: Color.js
Class for creating and manipulating colors in JavaScript. Includes basic color manipulations and HSB <-> RGB <-> HEX Conversions.
License:
MIT-style license.
*/
function Color(params){
var ptype = $type(params);