diff --git a/demo/colors.html b/demo/colors.html index 39547889..ef254b1b 100644 --- a/demo/colors.html +++ b/demo/colors.html @@ -40,10 +40,18 @@ { background: #333; } + #themes a.black:before + { + background: #000; + } #themes a.light:before { background: #f3f3f3; } + #themes a.white:before + { + background: #fff; + } #themes a.army:before, html.army .mm-menu { @@ -69,9 +77,21 @@ $html = $('html'); $('#themes a').click(function() { - $menu[ this.className == 'light' ? 'addClass' : 'removeClass' ]( 'mm-light' ); $html.removeAttr( 'class' ); - $html.addClass( this.className == 'light' ? 'mm-light' : this.className ); + $menu.removeClass( 'mm-black' ).removeClass( 'mm-light' ).removeClass( 'mm-white' ); + + switch( this.className ) + { + case 'black': + case 'light': + case 'white': + $html.addClass( 'mm-' + this.className ); + $menu.addClass( 'mm-' + this.className ); + break; + + default: + $html.addClass( this.className ); + } }); $menu.mmenu(); @@ -93,7 +113,9 @@