Use inline HTML Embeds with custom code, within collection list items to make small modifications to individual items.
Use IIFE's to protect your global variables.
Use self-element referencing and closest() to identify the collection item element easily.
<script>
(function() {
var currentScript = document.currentScript;
var link = currentScript.closest('a');
if (link) {
link.href = "#glossary-group-";
}
})();
</script>
Resources
See an application of this technique in this cloneable;
By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.