Explorar o código

Exercise 1: toggle "selected" when clicking on Charles Dickens.

Frederic G. MARAND %!s(int64=8) %!d(string=hai) anos
pai
achega
7e5229bfd9
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Chapter 3/03.js

+ 4 - 0
Chapter 3/03.js

@@ -60,4 +60,8 @@ $(document).ready(function () {
       setBodyClass(triggers[key]);
     }
   });
+
+  $('.author').click(function () {
+    $(this).toggleClass('selected');
+  });
 });