@@ -1 +1,1005 @@
+/**%0A * cbpViewModeSwitch.js v1.0.0%0A * http://www.codrops.com%0A *%0A * Licensed under the MIT license.%0A * http://www.opensource.org/licenses/mit-license.php%0A * %0A * Copyright 2013, Codrops%0A * http://www.codrops.com%0A */%0A(function() %7B%0A%0A%09var container = document.getElementById( 'cbp-vm' ),%0A%09%09optionSwitch = Array.prototype.slice.call( container.querySelectorAll( 'div.cbp-vm-options %3E a' ) );%0A%0A%09function init() %7B%0A%09%09optionSwitch.forEach( function( el, i ) %7B%0A%09%09%09el.addEventListener( 'click', function( ev ) %7B%0A%09%09%09%09ev.preventDefault();%0A%09%09%09%09_switch( this );%0A%09%09%09%7D, false );%0A%09%09%7D );%0A%09%7D%0A%0A%09function _switch( opt ) %7B%0A%09%09// remove other view classes and any any selected option%0A%09%09optionSwitch.forEach(function(el) %7B %0A%09%09%09classie.remove( container, el.getAttribute( 'data-view' ) );%0A%09%09%09classie.remove( el, 'cbp-vm-selected' );%0A%09%09%7D);%0A%09%09// add the view class for this option%0A%09%09classie.add( container, opt.getAttribute( 'data-view' ) );%0A%09%09// this option stays selected%0A%09%09classie.add( opt, 'cbp-vm-selected' );%0A%09%7D%0A%0A%09init();%0A%0A%7D)();
 %0A

Update ViewModeSwitch.js