Background slider

Below we have the code for a jQuery based background slider. No additional CSS or HTML modifications are required. The following slider creates DIV elements automatically and also resizes them to fit the window, together with preloading the necessary images.

Using the script:

The code above inits the background slider with a list of images and then uses javascript’s setInterval function to change the images every 10 seconds.