Sfoglia il codice sorgente

Listing 6.3: $.loadJSON().

Frederic G. MARAND 9 anni fa
parent
commit
c114f16a58
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      Chapter 6/06.js

+ 5 - 0
Chapter 6/06.js

@@ -6,4 +6,9 @@ $(document).ready(function () {
     $('#dictionary').load('a.html');
     alert('Loaded');
   });
+
+  $('#letter-b a').click(function (event) {
+    event.preventDefault();
+    $.getJSON('b.json');
+  });
 });