sinθ
sinθ

Reputation: 11493

Setting width and height of fancybox

I've tried the following code with little to no avail:

    $(document).ready(function(e){
        $(".iframe").fancybox(
                {
                    height: 950,
                    width: 400                        }
        );
    });

I've put everything in quotes and everything without quotes and nothing seems to have any effect of the fancybox. There does seem to be some effect on the width, but it's irregular and temperamental. From what I can tell, all including the width does it set the width to it's default value.

Upvotes: 1

Views: 4336

Answers (1)

user1512616
user1512616

Reputation: 509

Try:

$(document).ready(function() {
    $(".iframe").fancybox({
       maxWidth  : 950,
       maxHeight : 400,
       fitToView : false,
       width     : '100%',
       height    : '100%',
       autoSize  : false
    });
});

Upvotes: 6

Related Questions