jQuery UI #5027
http://bugs.jqueryui.com/ticket/5027
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>
<p><a href="http://bugs.jqueryui.com/ticket/5027">jQuery UI #5027</a> - Using the <code>resizable</code> plugin's <code>animate</code> option breaks the <code>grid</code> option.</p>
<div id="resizable"></div>
<span id="dimensions"></span>
CSS
body { padding: 20px; }
p { line-height: 1.5; margin-bottom: 20px; }
#resizable {
border: 1px solid black;
height: 100px;
width: 100px;
}
#dimensions {
display: block;
margin-top: 20px;
}
JavaScript
$('#resizable').resizable({
grid: 50,
animate: true
});
var $resizable = $('#resizable');
setInterval(function() {
$('#dimensions').html('Size: ' + $resizable.css('height') + ' by ' + $resizable.css('width'));
}, 1000);