Reputation: 15
I am using fancybox2 on my website at www.baseshamai.com. If you click portfolio and then (only the first 2 thumbs work right now) click a thumbnail for the first time, it either loads a skinny piece or loads it from a weird place. However the next time you open the same thumbnail it will load it correctly. Why is this happening? And even when I set minWidth to auto it opened the right size but in a weird place.
I should mention that these pages that are being loaded via fancybox have almost no content, rather they have divs that have background images. I thought it was smarter to break up the images.
Upvotes: 1
Views: 441
Reputation: 41143
Since you are opening external pages, better use fancybox.iframe
instead of fancybox.ajax
. If you use the second, fancybox will try to get the dimensions from the incoming content and resize itself after a re-calculation of the dimensions. The next time you open fancybox, it opens correctly since the dimensions have been already cached.
Also, if you want to have better control over the size of the box, you may try adding the width
and height
API options to your custom fancybox script.
Upvotes: 1