The following code adds a class to the last div:
$(".mydivs:last").addClass('added');
This works on page load but the divs are in an animation, so the order changes. Is there a way to make the code run every second, so the class is added to the last div each time?
For me I dont think it matters that eventually every div will have the new class.
Thanks
you can use animation or: