I’m really new in JavaScript. I want something like this:
$(document).ready(function () {
var cur = -1;
//while (true) {
// $('.slider .cadr').eq(cur).fadeOut();
// cur += 1;
// $('.slider .cadr').eq(cur).fadeIn();
//
// delay(); // how do I do this?
//}
});
So how do I delay? Please fix my jsfiddle: http://jsfiddle.net/SpyZF/
There something like
setIntervalfunction instead of it. See demo: http://jsfiddle.net/wxkhH/Syntax:
And you should do
Other way they will start at the moment.
And if you want it goes cyclical, then use
cur = (cur + 1) % 4;