Skip to content

Instantly share code, notes, and snippets.

function Selector_Cache() {
var elementCache = {};
var get_from_cache = function( selector, $ctxt, reset ) {
if ( 'boolean' === typeof $ctxt ) { reset = $ctxt; }
var cacheKey = $ctxt ? $ctxt.selector + ' ' + selector : selector;
if ( undefined === elementCache[ cacheKey ] || reset ) {
elementCache[ cacheKey ] = $ctxt ? $ctxt.find( selector ) : jQuery( selector );
@jjeaton
jjeaton / .vimrc
Last active August 29, 2015 14:28 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15