简体   繁体   中英

Using Jquery Fancybox auto height within an Iframe?

I'm using Fancybox iframe form. form height 350px when finish form the result is just two lines.

could any one tell me how to make auto height for the window

my javascript code is

$(document).ready(function() {      
    $("#send_friend").fancybox({
        'width'             : 310,
        'height'            : 350,
        'autoScale'         : false,
        'transitionIn'      : 'none',
        'transitionOut'     : 'none',
        'type'              : 'iframe',
        'showCloseButton'       :false,
        'padding'           : 0,
        'margin'            : 0,
        'transitionIn'      : 'elastic',
        'transitionOut'     : 'elastic',    
        'overlayOpacity':'0.3', 
    });

});

Thanks in advance

Try giving the iframe a matching height and width (see below), but more importantly give the finish form screen a firm height and width as well, if needed by wrapping it in a DIV tag.

<iframe style="height: 350px; width 350px;" />
...
<div style="height: 350px; width 350px;">
<form>
Thank you for sending to a friend.
</form>
</div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM