Is there any method available to adjust the height of an iframe (which loads an external site) dynamically ?
OR
is there any way to check whether if the iframe has a scroll-bar present ?
Is there any method available to adjust the height of an iframe (which loads an external site) dynamically ?
OR
is there any way to check whether if the iframe has a scroll-bar present ?
Try this:
// Get the iFrame jQuery Object
var $MyFrame = $("#iframeid");
// You need to wait for the iFrame content to load first
// So, that the click events work properly
$MyFrame.load(function () {
var frameBody = $MyFrame.contents().find('body');
// Set the iFrame height
$MyFrame.css({
height: frameBody.outerHeight()
});
});