Hello
I’am actrually setupping a list with more than 5 query to collection.
I have find the tutorial for using jquery script to have my list
Actually, the script look fin, no javascript error
The fact is that i didn’t succes to print my image file (Icone label in the cms) with this script
<div class="risques-list" id="risques-slug} }}">
</div>
<script>
window.addEventListener('DOMContentLoaded', function() {
jQuery(function() {
jQuery('#risques-slug').load("/etapes/slug .risques-list")
});
});
</script>
I use this cript befor footer
<script>
// sort nested collection items "RISQUES" alphabetical after DOM loaded
window.addEventListener('load', function() {
$('.risques-list').each(function(){
$(this).children('.risques').sort((a,b)=>a.innerText.localeCompare(b.innerText)).appendTo(this);
});
});
// sort nested collection items "PREVENTIONs" alphabetical after DOM loaded
window.addEventListener('load', function() {
$('.prerventions-list').each(function(){
$(this).children('.preventions').sort((a,b)=>a.innerText.localeCompare(b.innerText)).appendTo(this);
});
});
// sort nested collection items "MATERIELs" alphabetical after DOM loaded
window.addEventListener('load', function() {
$('.materiels-list').each(function(){
$(this).children('.materiels').sort((a,b)=>a.innerText.localeCompare(b.innerText)).appendTo(this);
});
});
</script>
any idea ?
Here is my site Read-Only: [LINK](Webflow - NSI)
(how to share your site Read-Only link)