Fancybox next prev or goTo

Is there a way to share images on fancybox (v2) galleries manually?

Sort of:

$.fancybox.next() , $.fancybox.prev() or $.fancybox.goto(idx) ?

+4
source share
1 answer

Yes, you are looking for the methods $.fancybox.next() , $.fancybox.prev() and $.fancybox.jumpto() .

From the Fancybox v2 Documentation :

next:

$. Fancybox.next ()

Go to the next gallery item prev

previous:

$. Fancybox.prev ()

Go to the previous gallery item

jumpto:

$. fancybox.jumpto ([index])

Scroll to the gallery item by index. Counting positions starts at 0, for example. $ .fancybox.jumpto (0); will open the first, for example. $ .fancybox.jumpto (1); will be second, etc.

+3
source

Source: https://habr.com/ru/post/1441357/


All Articles