Skip to content

Instantly share code, notes, and snippets.

@docluv docluv/gist:6271867
Created Aug 19, 2013

Embed
What would you like to do?
function swap(newView, oldView) {
var newView = document.getElementById(newView),
oldView = document.getElementById(oldView),
viewWrapper = document.getElementById("viewWrapper");
oldView.classList.remove("current-view");
newView.classList.add("current-view");
viewWrapper.appendChild(newView);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.