# (Squarespace) Randomize testimonial carousel

**URL:** <https://community.elfsight.com/t/squarespace-randomize-testimonial-carousel/108803>\
**Category:** Platform Tips\
**Tags:** squarespace\
**Created:** [March 23, 2025, 11:20am UTC](https://community.elfsight.com/t/squarespace-randomize-testimonial-carousel/108803 "2025-03-23T11:20:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuanphan](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/tuanphan/32/3165_2.png) [@tuanphan](https://community.elfsight.com/u/tuanphan)\
**Post date:** [March 23, 2025, 11:20am UTC](https://community.elfsight.com/t/squarespace-randomize-testimonial-carousel/108803/1 "2025-03-23T11:20:45Z")

</div>

To make testimonial carousel randomize, you can follow these.

**#1.** First, [find Carousel ID](https://community.elfsight.com/t/how-to-find-id-in-squarespace/65340).

In my example, it is: section[data-section-id=”67ce38e67ee9543f3f788ef2″]

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/0/7/077dab8ceb5ae7ac46505e2e39f445e5f6cc9fa9.jpeg)

**#2.** Next, use this code to Code Injection \> Footer.

Remember to update ID.

```auto
<script>
document.addEventListener('DOMContentLoaded', function() {
  const slidesContainer = document.querySelector('section[data-section-id="67ce38e67ee9543f3f788ef2"] .user-items-list-banner-slideshow .slides');
  
  if (slidesContainer) {
    const slideItems = Array.from(slidesContainer.querySelectorAll('.slide.list-item'));
    const shuffledItems = [];
    while (slideItems.length > 0) {
      const randomIndex = Math.floor(Math.random() * slideItems.length);
      shuffledItems.push(slideItems.splice(randomIndex, 1)[0]);
    }
    const originalSlides = slidesContainer.querySelectorAll('.slide.list-item');
    originalSlides.forEach(slide => {
      slidesContainer.removeChild(slide);
    });
    shuffledItems.forEach(item => {
      slidesContainer.appendChild(item);
    });
  }
});
</script>

```

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/1/6/161ddde854670d6d9a878bb1d9e4e4eccd84e320.jpeg)
