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

Next/Prev "buttons" don't work if above the slider element in the DOM #773

Open
Johnsoct opened this issue Apr 24, 2020 · 1 comment
Open

Comments

@Johnsoct
Copy link

First, love Lory!

Second, as for the issue I'm seeing is: the design I'm working with demands for the "prev/next" buttons to be above the carousel/slider, so I tried a few various things:

Not that it matters, but for the examples, I'm using Vue.js for this project...

a) I saved lory(el, options) to my component's local data and then on the custom buttons I created, set the @click callback to slider.next()/prev()... Nothing happened. Okay.
b) I added the 'js_prev/next prev/next' classes to my custom button elements... Nothing happened. Okay.
c) I removed my custom buttons and replaced them with the prerequisite HTML spans (which are not accessible, btw) and still, nothing happened.

So, I then put the prerequisite HTML spans back underneath the slider and BOOM, it works!

I got a bit curious and did the exact same steps above but I placed my custom buttons BELOW the slider, and what do you know, it works!


TL;DR;

I don't believe the carousel works when the control buttons are above/below the carousel, which is odd if I'm using the public API, yet, that's what's happening.

@Johnsoct
Copy link
Author

I may have it working ATM, so I'll update this with what I find.

I may very well have been missing something!

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

1 participant