3.9.js 441 B

123456789101112131415161718
  1. $(document).ready(function() {
  2. $('#switcher h3').click(function() {
  3. $('#switcher button').toggleClass('hidden');
  4. });
  5. });
  6. $(document).ready(function() {
  7. $('#switcher-default').addClass('selected');
  8. $('#switcher button').click(function() {
  9. var bodyClass = this.id.split('-')[1];
  10. $('body').removeClass().addClass(bodyClass);
  11. $('#switcher button').removeClass('selected');
  12. $(this).addClass('selected');
  13. });
  14. });