jQuery UI #7453

http://bugs.jqueryui.com/ticket/7453

by TJ VanToll

HTML

<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<link href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<!--
<link href="http://code.jquery.com/ui/jquery-ui-git.css" rel="stylesheet" />
<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
-->

<p><a href="http://bugs.jqueryui.com/ticket/7453">jQuery UI #7453</a> - When a <code>resizable</code> element is animated the <code>stop</code> event returns an incorrect size.</p>

<div id="resizable"></div>

CSS

body { padding: 20px; }
p { line-height: 1.5; margin-bottom: 20px; }

#resizable {
    height: 100px;
    width: 100px;
    border: 1px solid black;
}

JavaScript

$('#resizable').resizable({
    animate: true,
    stop: function(event, ui) {
        console.log('Height: ' + ui.size.height);
        console.log('Width: ' + ui.size.width);
    }
});