Преглед изворни кода

Listing 6.12: $(foo).load to post with a query.

Frederic G. MARAND пре 9 година
родитељ
комит
8cec86428b
1 измењених фајлова са 1 додато и 3 уклоњено
  1. 1 3
      Chapter 6/06.js

+ 1 - 3
Chapter 6/06.js

@@ -74,8 +74,6 @@ $(document).ready(function () {
   $('#letter-e a').click(function (event) {
     event.preventDefault();
     var requestData = { term: $(this).text() };
-    $.post('e.php', requestData, function (data) {
-      $('#dictionary').html(data);
-    });
+    $('#dictionary').load('e.php', requestData);
   });
 });