Brought to you by kyco.io
 
		 
		 
		 
		 
		 
		 
		 
		 
		 
	 
		 
		 
		 
		 
		 
		 
		 
		 
		 
	Does the same various actions on each step but with some different settings.
Does various actions on each step.
$(document).ready(function() {
    $('.demo2.right').kycoPreload({
        showInContainer: true,
        useOpacity: true,
        animateDuration: 1000,
        fadeOutDuration: 2000,
        showImagesBeforeComplete: false,
        afterEach: function() {
            console.log('.demo2.right: nothing special happening here...');
        },
        beforeComplete: function() {
            console.log('.demo2.right: image elements have been preloaded, but lets not show them until we fade out');
        },
        onComplete: function() {
            console.log('.demo2.right: all done, show images');
        }
    });
});
	
$(document).ready(function() {
    $('.demo2.left').kycoPreload({
        showInContainer: true,
        useOpacity: true,
        animateDuration: 1000,
        fadeOutDuration: 2000,
        showImagesBeforeComplete: true,
        afterEach: function() {
            var timestamp = new Date();
            var hours = timestamp.getHours();
            var minutes = timestamp.getMinutes();
            var seconds = timestamp.getSeconds();
            var milliseconds = timestamp.getMilliseconds();
            while ((hours + '').length < 2) { hours = '0' + hours; }
            while ((minutes + '').length < 2) { minutes = '0' + minutes; }
            while ((seconds + '').length < 2) { seconds = '0' + seconds; }
            while ((milliseconds + '').length < 3) { milliseconds = '0' + milliseconds; }
            console.log('.demo2.left: ' + hours + ':' + minutes + ':' + seconds + '.' + milliseconds, this);
        },
        beforeComplete: function() {
            console.log('.demo2.left: images preloaded');
        },
        onComplete: function() {
            console.log('.demo2.left: cool beans!');
        }
    });
});