fancyapps / fancybox

jQuery lightbox script for displaying images, videos and more. Touch enabled, responsive and fully customizable.
http://fancyapps.com/
7.27k stars 1.78k forks source link

Selective buttons #2638

Open stathimexas opened 2 years ago

stathimexas commented 2 years ago

Hi Janis. How can I implement a different bind for fancybox? I have this now:

Fancybox.bind('[data-fancybox="gallery"]', { Thumbs:{autoStart:true,}, Toolbar:{ autoEnable:false, display:["download","counter","zoom","slideshow","fullscreen","thumbs","close",], }, });

But on some images, I do not want to display the "download" button. Is there a way to do this?

stathimexas commented 2 years ago

I resolved it.

I created a new bind:

Fancybox.bind('[data-fancybox="gallery-nodownload"]', { Thumbs:{autoStart:true,}, Toolbar:{ autoEnable:false, display:["counter","zoom","slideshow","fullscreen","thumbs","close",], }, });

Thank you.