So, I’m trying to create a filter using the Mixitup library. I have done this before, but this time I want to create a slider to sort the items by price range.
My problem is that this example uses the following syntax:
var size = Number(target.dom.el.getAttribute(‘data-size’));
As we know, custom attributes can’t be dynamic in Webflow (It is on the wishlist). So what I’m after is this: Is it a way to “translate” the JS snippet above to fetch the price attribute from a number field in the CMS instead?
I was thinking getElementsByClassName, but this will probably not work since it then fetches lots of values from all divs with that name? My JS knowledge is somewhat limited.
I’m hoping this is the only tweak I need to make it work.
I have implemented a small test page on an existing site i have. This is just a sandbox FYI.
Here is my site Read-Only: LINK