Browse Source

Fixed the bug when fading effect is longer than then slideshow delay

Jay Salvat 14 năm trước cách đây
mục cha
commit
ca82967f21
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      jquery.vegas.js

+ 5 - 1
jquery.vegas.js

@@ -181,7 +181,7 @@
                 }
 
                 if ( options.preload ) {
-                    $.vegas( 'preload', options.backgrounds )
+                    $.vegas( 'preload', options.backgrounds );
                 }
             }
 
@@ -207,6 +207,10 @@
                 var settings = backgrounds[ step++ ];
                 settings.walk = options.walk;
 
+                if ( settings.fade > options.delay ) {
+                    settings.fade = options.delay;
+                }
+
                 $.vegas( settings );
             }
             doSlideshow();