Skip to content

Instantly share code, notes, and snippets.

@andrewn
Created May 27, 2011 11:23
Show Gist options
  • Save andrewn/995068 to your computer and use it in GitHub Desktop.
Save andrewn/995068 to your computer and use it in GitHub Desktop.
attachedTo is not accessible from outside the object
define(['jquery-1'], function($){
var attachedTo = [],
selector = '.toggle';
function init() {
attachedTo = $(selector);
}
function destroy() {
attachedTo = [];
}
return {
init: init,
destroy: destroy,
attachedTo: attachedTo
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment