Browse Source

Listing 4.20: bypassing the queue for simultaneous animations.

Frederic G. MARAND 9 years ago
parent
commit
1e2d4e4c89
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Chapter 4/04.js

+ 2 - 2
Chapter 4/04.js

@@ -39,8 +39,8 @@ $(document).ready(function () {
     var $switcher = $(this).parent();
     var switcherWidth = $switcher.outerWidth();
     $switcher.css({ position: 'relative' })
-      .fadeTo('fast', 0.2)
-      .animate({left: paraWidth - switcherWidth}, 'slow')
+      .fadeTo('fast', 0.1)
+      .animate({left: paraWidth - switcherWidth}, {duration: 'slow', queue: false})
       .fadeTo('slow', 1.0)
       .slideUp('slow')
       .slideDown('slow')