Sfoglia il codice sorgente

Listing 3.8: toggleClass() method.

Frederic G. MARAND 8 anni fa
parent
commit
630a857ee2
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      Chapter 3/03.js

+ 4 - 0
Chapter 3/03.js

@@ -14,4 +14,8 @@ $(document).ready(function () {
     $('#switcher button').removeClass('selected');
     $(this).addClass('selected');
   });
+
+  $('#switcher h3').click(function () {
+    $('#switcher button').toggleClass('hidden');
+  });
 });