In the fancybox homepage (http://fancybox.net/home) there is an example that opens an iFrame dimensioned as the 75% of the screen.
I can't get it by modifying the width and height properties on the .js file as described on the site.
You should try this:
$('iframeLink').fancybox({
'width':300,
'height':200,
'type':'iframe',
'autoScale':'false'
});
Hi I just read through all of these and I had to take bits and pieces of what everyone else wrote to get it to work. I wanted a window 600 by 410
First change the java script I dealt with the file: jquery.fancybox-1.3.4.js (this may change with later versions) under defaults set your height and width
width : 600, height : 410,
*then change the script on your webpage
$("#various3").fancybox({
'width' : 600,
'height' : 410,
'autoScale' : false,
'type' : 'iframe'
please note the size is not in single quotes! I wasted an hour before I saw this mistake.
This should help. Now if someone can tell me how to get this iframe to pop up on page load.
I'm guessing you should set the fancybox height as
$(window).height() * 0.75
but I would personally prefer to do it with pixels like
$(window).height() - 80
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With