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

Make functions public #120

Open
HolgerSchulz opened this issue Jul 13, 2020 · 5 comments
Open

Make functions public #120

HolgerSchulz opened this issue Jul 13, 2020 · 5 comments
Assignees

Comments

@HolgerSchulz
Copy link

Hi,

I have seen that many people did not immediately realize that you can move the slider with the mouse/finger.
Therefore I added a small animation and a hint. See:
https://www.unser-hueckeswagen.de/Fotos/Schloss-Hueckeswagen.html
Unfortunately I had to patch the JavaScript code for this because I had to access adjustSlider.
If there is an update, it would be nice if you could access the functions like adjustSlider from outside.

Thanks
Holger

P.S. Thanks for this great lib!!!

@phoebusryan
Copy link

Good Input! +1

@nickMarz
Copy link

nickMarz commented Dec 2, 2020

Hi, @HolgerSchulz and @phoebusryan, sure we can go ahead expose that function! It doesn't look like much of the other internal functions would be valuable to be exposed but I'm open to it if either of you has any other requests?

@nickMarz nickMarz self-assigned this Dec 2, 2020
@phoebusryan
Copy link

Sounds good!

I think eventhandlers for moving the handle would be very nice. This was an input of one of my customers and I had to change your file to to this.

see here: https://bohnenstueck.ch/
(If you move the handle, the tabs on the right changes)

@nickMarz
Copy link

nickMarz commented Dec 3, 2020

@phoebusryan Here's the proposed PR: https://github.com/zurb/twentytwenty/pull/122/files

New Public Functions:

  • adjustSlider
    -- Accepts Float Range: 0.0 - 1.0

New Public events:

  • onMoveStart
  • onMove
  • onMoveEnd
    -- Callbacks: Returns jQuery Event and Slider Percentage (0.0 - 1.0)

@phoebusryan
Copy link

Ah, very nice. I will check it.

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

No branches or pull requests

3 participants