I\'ve the following sample html, there is a DIV which has 100% width. It contains some elements. While performing windows re-sizing, the inner elements may be re-positioned,
You can use iframe
or object
using contentWindow
or contentDocument
on resize. Without setInterval
or setTimeout
relative
IFRAME.contentWindow
- onresize
event
This is my div
The Javascript:
$('div').width(100).height(100);
$('div').animate({width:200},2000);
$('object').attr({
type : 'text/html'
})
$('object').on('resize,onresize,load,onload',function(){
console.log('ooooooooonload')
})
$($('iframe')[0].contentWindow).on('resize',function(){
console.log('div changed')
})
JsFiddle: https://jsfiddle.net/qq8p470d/
element-resize-event