'); numImagesLoaded++; if(numImagesLoaded == 1) { $('#status').fadeOut(); // will first fade out the loading animation $('#preloader').delay(50).fadeOut('slow', function(){ $( "#carousel-example-generic" ).attr('data-ride', "carousel"); $( ".item" ).first().addClass( "active" ); }); // will fade out the white DIV that covers the website. $('body').delay(50).css({'overflow':'visible'}); $('.carousel').carousel({ pause: "false", interval: 10000 }); $('.carousel').css({'margin': 0, 'width': $(window).outerWidth(), 'height': $(window).outerHeight()}); $(window).on('resize', function() { $('.carousel').css({'width': $(window).outerWidth(), 'height': $(window).outerHeight()}); }); } } }); });