How can I add different list items that show e.g. an image after the third, seventh and eleventh list item which derive from the collection.products?
I have tried jQuery but it did not work. Any idea?
<ul id="collection-grid" data-id="{{ section.id }}" class="grid">
{%- for product in collection.products -%}
<li class="grid-item">
{% render 'product-wrapper' %}
</li>
{%- endfor -%}
</ul>
<script>
$( "ul:nth-child(3)" ).append( "<li class="info-card card-wrapper"><img...></li>" );
</script>