Streaming live at 10am (PST)

Mixitup - Get value from CMS instead of custom attribute

Hi guys!

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.

I’m following this example, who should turn out like this.

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

Any chance you figured this out? I’m looking for the same solution.

No, i didn’t. But I have found another solution:

Maybe this will help :blush: