Ver Fonte

Listing 4.13: animate() using toggle.

Frederic G. MARAND há 8 anos atrás
pai
commit
2c3b378f00
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      Chapter 4/04.js

+ 1 - 1
Chapter 4/04.js

@@ -22,7 +22,7 @@ $(document).ready(function () {
   $firstPara.hide();
   $('a.more').click(function (event) {
     event.preventDefault();
-    $firstPara.slideToggle('slow');
+    $firstPara.animate({height: 'toggle'}, 'slow');
     var $link = $(this);
     if ($link.text() == 'read more') {
       $link.text('read less');