Преглед изворни кода

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')