EXAMPLE: http://jsbin.com/ewiko4/5/
So I have some Dynamic divs that I need to figure out the height of when they change. I can get the height when the document loads but it won’t update.
In the example I’ve added a make bigger button but irl it will be changed via jq & ajax
Yup, I can’t add a callback to the animation button because it wont’t be there.
Take a look at this edit of your jsbin.
Couple of changes:
Your window events could be binded at the same time with
$(window).bind('load resize', resizeFrame)You want to call the
resizeFrameas a callback of the animation to let it know the sizes changed…If you don’t have control of the animation function changing the height (as indicated by your comment) you can use a
setIntervalto poll the heights.Would call your
resizeFramefunction every 150 ms. You can check the heights, see if they’ve changed, and do whatever you need to…