Time for action – creating a fullscreen slideshow
We'll keep working with the files that we created in the Time for action – creating a fullscreen background image section. The only change we'll need to make to create a slideshow rather than a single fullscreen background image is to our scripts.js
file. To do so, perform the following steps:
Open
scripts.js
and remove thesrc
andfade
options from thevegas()
method, as shown in the following code:$(document).ready(function(){ $.vegas({ })('overlay', { src: 'overlays/03.png' }); });
Next, we need to tell Vegas that we want to use a slideshow. Before we pass in the options object, tell Vegas to use a slideshow, as shown in the code:
$(document).ready(function(){ $.vegas('slideshow', { })('overlay', { src: 'overlays/03.png' }); });
Note that this slideshow option is outside the curly braces.
We'll pass in the slideshow options we want to use, inside the curly braces. First, let's add
delay
. This tells Vegas how long to...