{% for faqed in faqOne %}
<a href="#" class="spoiler" data-spoiler-link="1" >{{ faqed.title }}</a>
<p class="spoiler-content" data-spoiler-link="1" >{{ faqed.text }}</p>
{% endfor %}
<div class="spoler">
<a href="#" class="spoiler" data-spoiler-link="1" >{{ faqed.title }}</a>
<p class="spoiler-content" data-spoiler-link="1" >{{ faqed.text }}</p>
</div>
<div class="spoler">
<a href="#" class="spoiler" data-spoiler-link="1" >{{ faqed.title }}</a>
<p class="spoiler-content" data-spoiler-link="1" >{{ faqed.text }}</p>
</div>
<script>
var cont = document.querySelectorAll('.spoler');
cont.forEach(function(i0, ind) {
i0.querySelectorAll('[data-spoiler-link]').forEach(function(i) {
i.setAttribute("data-spoiler-link", ind+1);
})
});
</script>