$('body').heightChanged(function(){<br>
alert('event');<br>
});<br>
<br>
$('body').append('Hello!'); // и тут показывается алерт
$(window).resize(function() {
$('#log').append('<div>Handler for .resize() called.</div>');
});
Code in a resize handler should never rely on the number of times the handler is called. Depending on implementation, resize events can be sent continuously as the resizing is in progress (the typical behavior in Internet Explorer and WebKit-based browsers such as Safari and Chrome), or only once at the end of the resize operation (the typical behavior in Firefox).