0

I want to open a fancybox modal with the content type being an iframe and I want to specify the height as a %.

If I use

    $(".FullWindow").fancybox({
    type: 'iframe',
    href: 'http://www.google.com',
    autoSize: false,
    width: "95%",
    height: "95%"
});

then this opens the modal to the correct size (but does not load the url - I only added the href property as a test) but when I use

    $(".FullWindow").fancybox({
    type: 'iframe',
    autoSize: false,
    width: "95%",
    height: "95%"
});

the page opens but not at 95% of the window height.

I guess I am missing something simple

PROBLEM SOLVED Updated to the latest version of fancybox and the latest version of JQuery and it now works fine. Thanks to those who offered help.

Danny Seager
  • 23
  • 1
  • 5
  • Try setting 'autoScale': false – markpsmith Jan 23 '13 at 16:52
  • @markpsmith : `autoScale` is not a valid option for the new version of fancybox (the one the OP seems to be using) – JFK Jan 23 '13 at 17:13
  • Your code works fine **[jsfiddle](http://jsfiddle.net/dbBYh/)** ... otherwise check http://stackoverflow.com/a/10303090/1055987 – JFK Jan 23 '13 at 17:13
  • possible duplicate of [Fancybox 2 Height not working](http://stackoverflow.com/questions/10295746/fancybox-2-height-not-working) – JFK Jan 23 '13 at 17:16
  • 1
    BTW, you cannot open google in an iframe ... check http://stackoverflow.com/a/9372804/1055987 for more – JFK Jan 23 '13 at 17:17
  • Try adding `fitToView: false` – SeinopSys Jan 23 '13 at 17:23

0 Answers0