Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var $$ = function(param) {
var node = $(param)[0];
var id = $.data(node);
$.cache[id] = $.cache[id] || {};
$.cache[id].node = node;
return $.cache[id];
// Now, instead of doing $("#foo").data("foo") and ("#foo").data("foo", "bar"),
// you can do $$("#foo").foo and $$("#foo").foo = bar.
// from:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment