Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there anyway to get to an event that shows selection #15

Open
nordicblue opened this issue Oct 7, 2023 · 2 comments
Open

Is there anyway to get to an event that shows selection #15

nordicblue opened this issue Oct 7, 2023 · 2 comments

Comments

@nordicblue
Copy link

Hi!

Thanks for al the hard work on this.

I am attempting to show and hide a div, based on the dselect drop down selection. I normally just query the val of the ID of the original select, when using a normal Bootstrap 5 select dropdown, but this doesn't work with dselect. Is there anyway to see when a specific value is selected in the dselect buttons please?

@Yohn
Copy link

Yohn commented Nov 3, 2024

I'll get that added to a fork I just made probably in a couple hours.

@Yohn
Copy link

Yohn commented Nov 3, 2024

I just tested it, and it seems to be working how you expected.

<select id="select-id"></select>
const basic = document.querySelector('#select-id')
basic.addEventListener('change', () => {
  console.log(basic.value)
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants