I have created numerous picture galleries on the same page. If I click on one gallery picture, fancybox v3.5.7 opens and you are able to click through not just this gallery but all pictures in the WP Media library.
I'd like to limit the view to the specific gallery.
How do I adjust the jQuery code to achieve this?
I know how to give each gallery a class, but where do I put this jQuery code?
With this jQuery line I activate fancybox-3 for WordPress:
$( "a[href$='.jpg'], a[href$='.jpeg'], a[href$='.png'], a[href$='.gif']" ) . attr( 'data-fancybox', 'gallery' ) . fancybox({
buttons: [
"zoom",
//"share",
//"slideShow",
"fullScreen",
//"download",
//"thumbs", // blendet Buttons für Thumbnails ein
"close"
],
(and so on)
});