소스 검색

Listing 4.18: queued animate().

Frederic G. MARAND 8 년 전
부모
커밋
f9a9490685
1개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 5
      Chapter 4/04.js

+ 3 - 5
Chapter 4/04.js

@@ -40,10 +40,8 @@ $(document).ready(function () {
     var switcherWidth = $switcher.outerWidth();
     $switcher.css({
       position: 'relative'
-    }).animate({
-      borderWidth: '5px',
-      left: paraWidth - switcherWidth,
-      height: '+=20px'
-    }, 'slow');
+    }).animate({left: paraWidth - switcherWidth}, 'slow')
+      .animate({height: '+=20px'}, 'slow')
+      .animate({borderWidth: '5px'}, 'slow');
   });
 });