I am trying to add a scroll interaction to every rich text p, heading, and list item across the site. So far, I have added these individually, but the site is huge and I’m worried about this slowing down the site with lots of redundant code (not to mention the time it takes and currently there is no way to apply it automatically to new content).
<script> const el = document.querySelectorAll(".w-richtext p, .w-richtext h1, .w-richtext h2,.w-richtext h3,.w-richtext h4, .w-richtext h5, .w-richtext h6, .w-richtext ul li"); el.classList.add("slide-in--bottom"); </script>
Let me know if you all have any ideas on how to accomplish this! Thanks!!