Fancybox 2.0 Next and Previous Method for Gallery

2019-09-18 16:25发布

问题:

I'm using Fancybox version 2.04 and a realize there are still a couple issues but I am trying to implement the next and previous methods to use the zoomIn ZoomOut functionality instead of the Default slide down (which I'm assuming is the slideDown and I do think is awesome).

Here's the code I'm using but it isn't seeming to work, it closes the layer and doesn't progress to the next image in the gallery.

  $('.zoom').fancybox({
    nextMethod: 'zoomIn',
    prevMethod: 'zoomOut',
    helpers : {
      overlay   : {
        css : {
          'background-color' : '#fff'
        }
      }
    }
  });

回答1:

Wish I could help but I get the same problem when I try zoomIn + zoomOut.

I was searching for a way to make a smooth animated resize of the overlay's parent container, which was the way that Fancybox V1 worked. No luck though. I think the slide effect (misleadingly called 'elastic') is too showy. The 'none' setting is too abrupt, and the 'fade' setting fades out all the way before loading the next slide, showing the background content.

Hopefully more options will be provided in future versions.