i am new to j query, it is cool, but i am glued to the ceiling on how to add width and height to a iframe generated after click, using this code: all suggestions would be great and thanks in advance Khadija
$(document).ready(function () {
$(".fancybox").fancybox();
})
.height = '600px';
You must set autoSize to false
$(".fancybox").fancybox({'width':400,
'height':300,
'autoSize' : false});
To initialize the fancybox popup for the usage of an iframe, limited to a certain width and height, you need at least three parameters:
jQuery
$(document).ready(function(){
$(".fancybox").fancybox({
'width' : 600, // set the width
'height' : 600, // set the height
'type' : 'iframe' // tell the script to create an iframe
});
});
You can read all about the available options at the FancyBox API Page.
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