I try to listen from inside of iframe to changes of iframe width/height with:
$(window).resize(function(){
alert(\'1 on inside iframe\');
});
$(body).resize(function(){
alert('on inside iframe');
});
Edit :
in html
<body onresize="myFunction()">
You need to call the resize()
handler from the parent
document on the iframe
:
$('iframe').resize(function() {} );
Try that : http://www.iframehtml.com/iframe-scripts.html#resizeable-iframe
Or that : http://css-tricks.com/snippets/jquery/fit-iframe-to-content/