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

selecting the slider with js #9

Open
damianicely opened this issue Aug 29, 2022 · 1 comment
Open

selecting the slider with js #9

damianicely opened this issue Aug 29, 2022 · 1 comment

Comments

@damianicely
Copy link

Is there a simple way to select the slider using js?

In the noUISlider documentation they make use of a lot of methods such as:

slider.noUiSlider.getPositions();

Ideally Id like to be able to access this property and make changes to some elements css dynamically as the user moves a slider.
However, As I didn't initialize the slider myself I have no idea how to call it.

my template uses <x-range-slider id="order-price-slider" :options="$options" wire:model="selectedPrice" />

Ive tried order-price-slider.noUiSlider.getPositions()to no avail.
I'm sure this is my issue as opposed to a fault I'm just not sure how to get around it.

@jantinnerezo
Copy link
Owner

Hi @damianicely

This package only gets handle values but I can always add getting the position to the next release.

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