I have something like this:
<div id="container">
<img src="" id="bigImg">
</div>
On the page there are thumbs and when you click on them the #bigImg change (depedning on the thumbs)
Now I would like to prevent the #container to get smaller in the case you switch from a big image to a small image.
I tried something like this, but the event when i change the #bigImg.src doenst’ get triggered
$('#container').resize(function(){
alert($(this).height());
});
It does in IE (8 at least) but not in Firefox or Chrome, cant say for any others.
Ive setup a timer to check the offsetsizes periodically to perform my own onresize functionality, works for what I needed (divs may resize in my apps independently of the page )