Browse Source

Listing 3.8: toggleClass() method.

Frederic G. MARAND 9 năm trước cách đây
mục cha
commit
630a857ee2
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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');
+  });
 });