Browse Source

Fix the black screen when too many backgrounds are called repeatedly

Jay Salvat 14 years ago
parent
commit
5ed3074d17
1 changed files with 4 additions and 0 deletions
  1. 4 0
      jquery.vegas.js

+ 4 - 0
jquery.vegas.js

@@ -62,6 +62,10 @@
                 'top': '0px'
                 'top': '0px'
             })
             })
             .load( function() {
             .load( function() {
+                if ( $new == $current ) {
+                    return;
+                }
+                
                 $( window ).bind( 'resize.vegas', function( e ) {
                 $( window ).bind( 'resize.vegas', function( e ) {
                     resize( $new, options );
                     resize( $new, options );
                 });
                 });