Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distinguish between fancybox's for custom css

I'm trying to do some customer-mandated inconsistencies in the styling of different fancyboxes.

I can't seem to figure out a way to distinguish between which fancybox is open using a class or an ID or anything.

Is there any way to do this?

like image 414
Joren Avatar asked Dec 17 '22 03:12

Joren


1 Answers

Fancybox 2 has a wrapCSS option which lets you add a custom class to the lightbox for styling.

Like so:

$(".fancybox").fancybox();

$(".photo").fancybox({
    wrapCSS : 'photo-lightbox-class'
});

$(".video").fancybox({
    wrapCSS : 'video-lightbox-class'
});
like image 82
Dominic Avatar answered Jan 22 '23 08:01

Dominic