fancyapps / fancybox

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

how to add class after fancybox-container? #2661

Open hondatron90 opened 1 year ago

hondatron90 commented 1 year ago

I want to add a class after div.fancybox-container for example: fancybox-photo-viewer-mh <div class="fancybox-container fancybox-photo-viewer-mh fancybox-show-toolbar fancybox-show-caption fancybox-show-nav fancybox-is-open fancybox-is-zoomable fancybox-can-zoomIn" role="dialog" tabindex="-1" id="fancybox-container-2" style="transition-duration: 366ms;"> I used the .addclass method but it didn't work. Can anyone help me!

fancyapps commented 1 year ago

Hi,

Have you tried using mainClass option? Also, you can use any callback to do whatever you need. Every callback receives first parameter as reference to the current instance. And you can use it to access various DOM elements.