jQuery resize event for div children
$("div.content-left > *, div.content-main > *" ).live('resize',function(){alert("Size changed")});
does not work, because the resize event only 开发者_JS百科applies to window resizes. But in my case the divs change size late, because the content is loaded late by an ajax request - or by clicking a panel menu. I definatley need to avoid to register on all individual events of the children (ajax, click), because that can be very many different events and then it is not maintainable.
Maybe you can find this solution useful:
Create a jQuery special event for content changed: Create a jQuery special event for content changed
and adapt it to check wether div's size has changed.
精彩评论