You can't know what happens outside your document, and you're not notified when the resizing ends (a resizing can occur in many ways, not all of them mouse based).
But you could add a timer for the same effect :
(function(){
var timer;
$(window).resize(function(){
if (timer) clearTimeout(timer);
timer = setTimeout(function(){
// do the things
}, 200);
});
})();
This would add a slight delay (200 ms should be ok) but this would avoid most intermediate recomputing.
Note that you don't receive events when your javascript function is running, so you usually don't have to do this unless you really want the user to not see anything during the resizing.