hi @samliew, speaking of adding classes to the parent element when using dynamic lists, I’ve been trying to get mixItUp plugin to work with Webflow dynamic embed widget but had no luck. Btw, before attempting this I had managed to get it to work no problem without using the dynamic embed.
Basically, in order to addlClass to the parent div (.mix) from the child element (.category), I’ve been using this custom code I found in another post on this forum and which was posted by @sabanna (btw, Anna, you might have a solution for this yourself…):
And I may know why on your site it doesn’t work now.
Originally that code snippet for dynamic content looking in the element with class “w-dyn-item” (original Webflow dynamic class), taking text from the element with class “category”, which is a child, and applying it to the parent (dynamic item). As a result, you have to have a structure, where every dynamic item will have a combo class equal a category name.
In your structure, you added “extra layer/level”.
Try to give dynamic item class “mix” and move whole structure one level up. And the Dynamic list should have an ID #mixItUp-container
Don’t know if the code snippet will have to be changed, but you can try and check without changing.
I am sorry, it was my fault. Apparently he used “extra layer” too. So you can add one more div to wrap all content inside the dynamic item, or simply remove one word from code snippet: