Explorar o código

Listing 6.16: fadeIn() on load().

Frederic G. MARAND %!s(int64=9) %!d(string=hai) anos
pai
achega
55471653ee
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      Chapter 6/06.js

+ 3 - 1
Chapter 6/06.js

@@ -3,7 +3,9 @@ $(document).ready(function () {
 
   $('#letter-a a').click(function (event) {
     event.preventDefault();
-    $('#dictionary').load('a.html');
+    $('#dictionary').hide().load('a.html', function () {
+      $(this).fadeIn();
+    });
   });
 
   $('#letter-b a').click(function (event) {