Friday 20th November 2009

by Sajith M.R

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

Tags: , , , , ,

· · · ◊ ◊ ◊ · · ·

8 Responses to “Fancybox runtime height change”

  1. Fer says:

    it would be easier to simply use $.fancybox.resize();

  2. David says:

    I love me jqueries. I hugged jqueries at night all over.

  3. Philipp says:

    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

  4. Sajith M.R says:

    When you would like to resize the fancy box, use this code. It is upto you

  5. rajasekhar says:

    where to paste the code?

  6. mvp says:

    how to use autoheight changes in fancybox in files?

  7. Hw says:

    Really interesting article to read on.. I�m truly amazed with this article. Looking forward for future posts.

  8. I will post a link to this page on my blog. I am sure my visitors will think of this post very informative.

· · · ◊ ◊ ◊ · · ·

Leave a Reply

وظائف 2011 تحويل العملات برامج برنامج تسريع التحميل برنامج الفلاش برنامج محول الصوتيات عربي hotel 2011 زيادة رواتب العساكر 1431