I want to change the order of my child divs in the parent div, every 2 seconds with no interactions (rotate by its self if page is loaded:
First child needs to move to third child, second child needs to move to the first child and the third child needs to move to the second child
The second and third child should always have the class "small" and when it reach the first child position it should be removed.
HTML
<div class="inner-testimonial">
<div class="slide">
<h4>Copy here</h4>
</div>
<div class="slide small">
<h4>Copy here</h4>
</div>
<div class="slide small">
<h4>Copy here</h4>
</div>
</div>
JQuery
$(".inner-testimonial .slide:nth-child(1)").removeClass('small');
$(".inner-testimonial .slide:nth-child(2)").addClass('small');
$(".inner-testimonial .slide:nth-child(3)").addClass('small');
How can I do this?