how to make jQuery .resize() function trigger only when the div actually resizes to grid?
<p>When you snap resizable to a grid like in the example below you get the .resize() function triggered for every pixel you drag your mouse.</p>

<pre><code>$("#box").resizable({grid:[50,50]);
$("#box").resize(function(){
    var w = $(this).width();
    var h = $(this).height();
}
</code></pre>

<p>How to make it so it triggers only when the size of the div actually changes?</p>

<p>Thanks!</p>
