Display dropdown selection text in button after clicking

Hey All,

I am using a dropdown menu to filter a slick slider on mobile. I need help with two items to get this working properly. It is the slider with all of the team members in the “Meet Our Team” section.

  1. I need the “ALL” filter to be applied by default – this happens just fine on desktop. I am using an event listener to click the all button on page load (though the desktop filter menu and mobile filter menu are different components.)

  2. Once a filter is selected from the dropdown menu, I need the dropdown menu to close (I have this working), and I need the text from the selection to display in the drop-down button, so the user knows which filter they have selected. It should function much like the select element in a form.

I very much appreciate any help with this!

Here is my site Read-Only: Webflow - Midi Health

I’m pretty sure that if you use this JS library instead: https://www.finsweet.com/attributes/?category=Filter+and+Sort you’ll find all the options you want for it to work the way you want.

Appreciate the response @vincent. I started with Finsweet’s library, but I couldn’t get both filter and slider to work nicely together.

@Zebediah_Miller I’ve used mixitup’s library for this. I particularly like the animation effect. One of my blogs uses it,