1

In Fancybox2 it seemed to disable the loop function also disabled the previous button on the first image and the next button on the last one.
In Fancybox3 that doesn't work. I am searching for some hours now and find nothing (ok, an entry here in the forum but that only confused me).
The developer said we should ask on Stackoverflow. Has someone an idea what I could do to make those arrows disappear and reappear at the correct locations?

Marcel Grüger
  • 885
  • 1
  • 9
  • 25

1 Answers1

2

Simply use CSS to hide disabled buttons:

.fancybox-navigation .fancybox-button[disabled] {
  display: none;
}

https://codepen.io/anon/pen/ZNyEVB

Edit: The reason why they are not hidden by default is that when user clicks fast enough and does not notice that he has reached last image, next click would be on background and that would close gallery. And that could be annoying.

Janis
  • 8,593
  • 1
  • 21
  • 27