Sfoglia il codice sorgente

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

Frederic G. MARAND 8 anni fa
parent
commit
7e5229bfd9
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  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');
+  });
 });