Explorar el Código

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

Frederic G. MARAND hace 8 años
padre
commit
7e5229bfd9
Se han modificado 1 ficheros con 4 adiciones y 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');
+  });
 });