Browse Source

Listing 4.18: queued animate().

Frederic G. MARAND 9 years ago
parent
commit
f9a9490685
1 changed files with 3 additions and 5 deletions
  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');
   });
 });