I'm trying to excute a code right after loading the page.
The "SetInterval" won't do it:\
This is the code:
var inter1;
function start() {
inter1 = setInterval(function() {
counter++;
slidernum = '#slider' + counter;
imgnum = '#img' + counter;
$('body').children(slidernum).fadeIn(1500);
}, 2000);
}
start();
I also tried to wrap it with a function but it's still loading after 2000 milliseconds.
Any help or alternatives? Thanks!