Dear Webflow Community,
I am trying to give a unique HTML ID to a heading inside a collection list item. It does not have any CMS content tied to it. But obviously, as it is part of the HTML collection list item, it gets duplicated with the every new collection list item, also duplicating it’s ID and making the ID non-unique.
It doesnt have to be a particular ID, it just has to be a unique one for each heading in each collection list item.
Use a script inside an embedded HTML element to find the innerText of another heading inside the collection list item that gets its content from the CMS and is therefore unique content.
The is problem that : $(this).find("#referenceHeadingId ").innerText; results in undefined.
And I tried and tested a lot but can’t seem to find the solution.
Is there maybe a better way to generate a unique ID for each heading in each collection list item?
Or is there a better way to access the innerText of an element?
I hope this is understandable.
Thanks in advance