Home › Forums › JavaScript › Setting (max) widths on certain/specified Fancybox overlays. › Reply To: Setting (max) widths on certain/specified Fancybox overlays.
November 2, 2016 at 4:01 am
#247295
Participant
Thanks a lot! Likely other pieces of code I’ve cobbled together though which didn’t quite work …which is why I post it here haha!
I ended up using
beforeLoad: function() {
if ($(this.element).hasClass('fancybox--small')) {
this.maxWidth = 600;
}
}
Seems to do the job. It’s not something I’ve ever needed and I’ve used the plug-in for years. Very much a fringe case. So, as long as that maxWidth
works as it is, it’ll certainly do! Going to do some further browser testing now though :)