-
Notifications
You must be signed in to change notification settings - Fork 602
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
Disable/Hide navigation arrows if all screens fully visible (contained) #495
Comments
One solution is to use |
Hey, Any way to make both ? Thanks a lot for you help. |
Sorry, there is no easy way to do both. I'm okay with leaving it at that. I'm closing the discussion here, but it may continue at #289 |
Thanks @desandro ! |
It is possible to hide arrow open this link http://codepen.io/desandro/pen/d17ed397a1dbb97bd52b9b9dfe1ac9dc/ And make changes in css /* position outside */ Thats it.. |
a better solution for hiding disabled buttons would be:
Use |
@matthias approach worked for me, I've done something similar using JS/jQuery since I'm creating my custom next-prev handlers. if ( $(".flickity-prev-next-button.previous").is(":disabled") && $(".flickity-prev-next-button.next").is(":disabled") ) {
$(".my-custom-handlers").addClass("hidden");
$(".flickity-page-dots").addClass("hidden");
} Please keep in mind |
I got around it with this ` var elem = document.querySelector('#{{ section.id }} .main-carousel'); function handleResize() { |
Hey there !
First, thanks for the awesome work. This is really the best slider out here :)
I'm trying to do something: if all screens are contained in slider container, disable or hide both navigation arrows.
This pen from #289 is a start, but look at this changes: with all slides contained, arrows are still displayed, but not really usefull in my case as all slides are fully visible (it's more a design issue than a technical one).
I know i could, after initialization, dynamicaly (and on resize) calculate the width of all slides, and the width of the slider container to see if all slides are fully contained ( == nothing to scroll on right, as my slide is left-aligned), and disable/hide arrows depending. I could then do like in #431 or #233 to dynamicaly change Flickity option after initialization and on resize to disable/enable arrows.
But i'm wandering if there's a better way to achieve that.
Thanks a lot !
The text was updated successfully, but these errors were encountered: