Is there a way to get the image width
and height
at beforeShow
of fancybox somehow, to be able to run an ajax request before showing according to the image size? If anybody did anything like this before, would help a lot, I guess the fancybox-inner
class already knows the width
at least of the picture that is going to be shown, even when autofit
and autosize
are enabled, since it computes from the active browser size.
Any suggestions pls?
If you are trying to get dimensions of a fancybox image, then
.fancybox-image
is the selector you are looking for. You could do something like :See JSFIDDLE