I have created a simple div fade cycle. Some of the divs are within an outer div, which is then placed in another outer div. I've written a script that cycles through these divs by fading them in and out. However, there seems to be a problem - the divs fade out correctly but do not fade back in as expected.
Take a look at this example to see the issue in action.
JS:
function tick() {
var $obj = $(".major_data .commitment_box .commitment");
$obj.first().fadeIn().delay(1000).fadeOut(function () {
$obj.first().insertAfter($obj.last());
tick();
});
}
tick();
Interestingly, when the cycle repeats itself, the effect works correctly. How can I achieve this desired effect from the beginning of the cycle?