Fancybox runtime height change
Posted on 20. Nov, 2009 by Sajith M.R in php
For those who use fancy box and iframe inside fancy box might face the issue of changing the height. Once fancybox is loaded with a particular height and width, it does not change when you change the content inside iframe dynamically. Auto height change is only possible for images.
Use the below code to change the dimensions of an iframe in runtime.
<script type=”text/javascript”>
parent.$(”#fancy_outer”).width(100); parent.$(”#fancy_outer”).height(120);
</script>
Cheers
Sajith



how to get tall
Nov 26th, 2009
I will post a link to this page on my blog. I am sure my visitors will think of this post very informative.
Hw
Nov 29th, 2009
Really interesting article to read on.. I�m truly amazed with this article. Looking forward for future posts.
mvp
Dec 9th, 2009
how to use autoheight changes in fancybox in files?
rajasekhar
Dec 29th, 2009
where to paste the code?
Sajith M.R
Dec 30th, 2009
When you would like to resize the fancy box, use this code. It is upto you
Philipp
Feb 1st, 2010
Hey Sajith,
thanks for your work. Would it be possible to see this line of code in action? Maybe an example page or something like that…
I have to admit, I have no clue how to use this :-/
Have a nice day
Philipp