소스 검색

Listing 4.13: animate() using toggle.

Frederic G. MARAND 8 년 전
부모
커밋
2c3b378f00
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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');