Преглед на файлове

Listing 4.20: bypassing the queue for simultaneous animations.

Frederic G. MARAND преди 8 години
родител
ревизия
1e2d4e4c89
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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')