Skip to content

Instantly share code, notes, and snippets.

@acidjazz
Last active December 19, 2015 15:59
Show Gist options
  • Save acidjazz/5980399 to your computer and use it in GitHub Desktop.
Save acidjazz/5980399 to your computer and use it in GitHub Desktop.
sections: ['checklist','news'],
swap: function(section) {
for (var i = 0, len = _.sections.length; i != len; i++) {
if (section != _.sections[i]) {
window[_.sections[i]].d();
}
}
window[section].i();
}
var news = {
i:function() {
$('.news').addClass('on');
},
d: function() {
$('.news').removeClass('on');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment