This is the situation, I have 2 div\'s next to each other. One div is very dynamic in height, which basically means it can grow and shrink to accommodate for it\'s content.
As the thread poelinca provided suggests, there are some nice plugins available for this functionality.
If you don't like the plugin idea, another simple solution would be to simply trigger a "resize" event on the div whenever the content is modified. Then you could monitor it with resize() as expected, utilizing an elegant observer pattern.
function appendContent($div, content) {
$div.append(content).trigger($.Event('resize'));
}
$div.bind('resize', function(e) {
// all your magic resize mojo goes here
});