I read that setTimeout
is less cpu resources intensive than setInterval
. This is my main reason to switch to setTimeout
.
This is the code of my ticker which is working perfectly fine, but I can't figure it out how make it work with setTimeout
instead of setInterval
function tick() {
$('#ticker li:first').slideUp(1000, function() {
$(this).appendTo($('#ticker')).slideDown(1000);
});
}
setInterval(function() {
tick()
}, 9000);