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

Stop sliding when only having 1 image? #158

Closed
zruu opened this issue Jun 10, 2016 · 8 comments
Closed

Stop sliding when only having 1 image? #158

zruu opened this issue Jun 10, 2016 · 8 comments
Labels
Milestone

Comments

@zruu
Copy link

zruu commented Jun 10, 2016

How can I make the Glide.js stop sliding when only having one image? Is it possible?

@zackmax
Copy link

zackmax commented Jul 6, 2016

I too am looking for this solution. Using this to display images on a news article. Will only need functionality when more than one item is in the slideshow. Did you ever figure something out zruu?

@zackmax
Copy link

zackmax commented Jul 6, 2016

I found this thread digging through older posts: #54

However, the code has likely been updated since because I can't figure out where that snippet of code goes. Maybe admin has some ideas?

@jedrzejchalubek jedrzejchalubek added this to the 2.0.9 milestone Jul 6, 2016
@jedrzejchalubek
Copy link
Member

jedrzejchalubek commented Jul 6, 2016

Issue you mentioning applies to version 1.^, not current. You can't apply it in version 2.^.

Solution is pretty straightforward. We need to escape eailer from Run.make() method, if number of slides is less or equal one.

Added to milestone, but pull requests are welcome :)

@jedrzejchalubek
Copy link
Member

Fixed with 040feee.

@zackmax
Copy link

zackmax commented Sep 12, 2016

Hi! Thank you for the recent commit. It stops the slide effect with just one image. But it still shows the Prev/Next control buttons. Any idea how to not show these?

Thanks in advance for your help!

@zackmax
Copy link

zackmax commented Oct 29, 2016

Hi! I want to check in and see if you had a solution to prevent the Prev/Next controls from showing when there is only one image?

@marcwieland95
Copy link
Contributor

The arrow gets a "disabled" class. So just apply custom CSS to hide it.
Removing the markup on the plugin side is not a good solution in my opinion.

@zackmax
Copy link

zackmax commented Oct 30, 2016

@marcwieland95 I can't believe I missed that! Thanks! Simple solution.

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

No branches or pull requests

4 participants