There are 3 blocks with the item class. How every 3 seconds to add the class active to the next element?
I do it, but it does not work
$(function() { $(document).each(function() { $(".item").removeClass("active"); $(".item.active").next().addClass("active"); }); });