Parcourir la source

Listing 6.7: fetching and evaluating JS with $.getScript().

Frederic G. MARAND il y a 9 ans
Parent
commit
7c9b9da70c
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      Chapter 6/06.js

+ 6 - 0
Chapter 6/06.js

@@ -32,4 +32,10 @@ $(document).ready(function () {
       $('#dictionary').html(html);
     });
   });
+
+  $('#letter-c a').click(function (event) {
+    event.preventDefault();
+    $.getScript('c.js');
+  });
+
 });