Marquee CMS Slider For Webflow (Clonable)

Clone This Site

Code For Marquee CMS Slider

<script>
document.querySelectorAll('[marquee]').forEach((el,i)=>{
  const s = el.getAttribute('marquee-speed')||15,
        d = el.getAttribute('marquee-direction')||'right',
        from = d==='right'?'translateX(-100%)':'translateX(0)',
        to = d==='right'?'translateX(0)':'translateX(-100%)';
  el.setAttribute('marquee',i);
  const c=el.cloneNode(true);
  c.setAttribute('marquee',i);
  c.removeAttribute('id');
  el.parentNode.appendChild(c);
  const style=document.createElement('style');
  style.textContent=`@keyframes m${i}{0%{transform:${from}}100%{transform:${to}}}[marquee="${i}"]{animation:m${i} ${s}s linear infinite}`;
  document.head.appendChild(style);
});
</script>

Paste this code into the "Before </body> tag" of each page its used on.

Faded sides can be set to any color or removed

You can set the gradient to any color you wish or remove them completely.
They are named "marquee_left-fade and marquee_right-fade"

Speed & Direction Can Easily Be Changed

You can change the speed and direction of the marquee in the variables section (in settings) after clicking on the Collection List Wrapper.
"marquee-speed" = [set your number] - the higher the number, the slower it goes.
"marquee-direction" = [set left or right] - set the direction you choose, this can be applied to multiple collections.