Explorar o código

Listing 3.8: toggleClass() method.

Frederic G. MARAND %!s(int64=9) %!d(string=hai) anos
pai
achega
630a857ee2
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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');
+  });
 });