Ver Fonte

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

Frederic G. MARAND há 9 anos atrás
pai
commit
8cec86428b
1 ficheiros alterados com 1 adições e 3 exclusões
  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);
   });
 });