I'm trying to make a website, where background image of Div-element changes every time the user reloads the page. That background image of that Div-element should always be random.
It should also change to another randomly chosen background image with fade transition after 3-5 seconds.
I've been trying Jquery.Cycle2.js and Jquery.shuffle.js which are working fine, when I'm doing that transition, but they don't change to random background image. They also don't change background image to a random image, when someone reloads page.
I've also been trying image = new Array and use Math.round and Math.random JavaScript elements. They're working fine when I want random background image when someone refreshes/reloads the page, but it's not changing it to another random background image (and therefore, not doing the transition).
So, I would like to have a Div-Element, which has a random background image (and it's always random and changes to another random background image when user reloads the page) and it changes to another random background image after 3-5 seconds with Fade effect.