I'm able to resize the height with the $.fancybox.resize();
part, but the width just doesn't update according to the new content. Thoughts?
views:
1466answers:
1
+2
A:
From the fancybox api docs:
$.fancybox.resize
: "Auto-resizes FancyBox height to match height of content."
So it looks like it is not intended to adjust in width.
If you wish to adjust the width, you can do it by manually resizing the #fancybox-wrap
and #fancybox-inner
elements. After some very quick checking, it looks like #fancybox-wrap
is set to 20px wider than #fancybox-inner
:
$('#fancybox-inner').width(400);
$('#fancybox-wrap').width(420);
You can also control the width when you first register fancybox using the width
option:
$('#somelink').fancybox({ width: 100px });
TM
2010-03-08 04:45:09
this works but it messed up my title
mcgrailm
2010-03-30 19:05:57