Go the the page “referenzen” to see the example.
At the beginning of a page there are some links. The titles of the links come from a dynamic list. Scrolling down you can see some full screen sections. Those also come from the same dynamic list.
I would like to anchor the links at the beginning of the page to full screen sections.
<script>
var Webflow = Webflow || [];
Webflow.push(function() {
// Set dynamic list IDs based on h1 tag content
$('.full-screen-block').each(function(i) {
$(this).attr('id', $(this).find('h1').first().text().toLowerCase().replace(/[^a-z]+/g, '-'));
});
});
</script>
Also, feel free to contact me for further code help and/or customization of third-party plugins
Hi Samliew, thank you for your help.
I did that already actually, but I don’t see it working.
I tried to give the h1 elements inside the dynamic list an ID and then anchoring them to the links above the fold but without success. I tried in different ways but nada.
The confusion comes from the fact that the custom code becomes active only after publishing the website. So I can’t see the option of anchoring the links in the Designer.
Could you explain me a little bit how this code should work?
Thanks so much for this advice. However, in my site it doesn’t change the ID’s for some reason. All else seems to be incorporated but the elements do not receive an ID to anchor to, could you help me with this? the site is http://Notre-dame.webflow.io/informatie-voor-leerlingen Thanks a lot!