I want to set the height of the iframe match it's content. But iframe.contentWindow returns undefined even after putting it inside .load(). Here's the code:
$(document).ready(function() {
var myIFrame = $('#iframe');
console.log(myIFrame.contentWindow); //getting undefined
});
Can someone tell me what's wrong in this? Thanks a lot.