Fancybox 2.0 Next and Previous Method for Gallery Mode

南笙酒味 提交于 2019-12-11 16:08:34

问题


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.



来源:https://stackoverflow.com/questions/8569211/fancybox-2-0-next-and-previous-method-for-gallery-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!