I got this website, www.harispapadakis.eu and I'm using this code
function changeBackground() {
++currentBackground > 2 && (currentBackground = 0),
$(".c-hero").fadeOut(4e3, function() {
$(".c-hero").css({
"background-image": "url('" + backgrounds[currentBackground] + "')"
}),
$(".c-hero").fadeIn(3e3)
}),
setTimeout(changeBackground, 15e3)
}
var currentBackground = 0,
backgrounds = [];
backgrounds[0] = "media/main.jpg",
backgrounds[1] = "media/main2.jpg",
backgrounds[2] = "media/main3.jpg",
$(document).ready(function() {
setTimeout(changeBackground, 7500)
});
(edit note: formatted from minified code, in which if
is minified to &&
, ;
is minified to ,
and 3000
is minified to 3e3
)
This code, is changing with FadeIn and FadeOut the background src...
I want to change the fade with slide to left... It's changing the background picture and I want a nice animation..
Thanks in advance