I try to listen from inside of iframe to changes of iframe width/height with:
$(window).resize(function(){
alert('1 on inside iframe');
});
or:
$(window.parent).find('iframe').resize(function(){
alert('2 on inside iframe');
});
but nothing happens when iframe size changes. (I need a cross-browser solution: IE7, Chrome, Firefox, Safari.)
Try that : http://www.iframehtml.com/iframe-scripts.html#resizeable-iframe
Or that : http://css-tricks.com/snippets/jquery/fit-iframe-to-content/
You need to call the
resize()
handler from theparent
document on theiframe
:in html