I want to listen the event whenever the document(body) size changed
which would caused by anything inside
(but you are assumed do not know what element caused the resize)
as the code below:
http://jsfiddle.net/marstone/7zaRT/8/
you can click the green area to change the div size, then the document.body resized.
however, the onresize event won’t be fired.
I found that it only works when the window resizes, such as drag/maximum the browser window
any workaround? any help appreciated.
This should do the trick:
Note however, that it tends to fire excessively, but I’ll leave it to you to figure the how this could fit into your app.
http://jsfiddle.net/pratik136/7zaRT/12/