JQuery UI resizable example (with buggy jquery-ui)

With JQuery UI 1.10.3, the resulting div after a resize is one pixel too small in both directions.

by winstonchang

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<div id="resize" class="demodiv">If you resize me to the same size, I shrink by one pixel each time (with jquery-ui jquery-ui 1.10.3). If <code>helper</code> isn't used, then it doen't shrink.</div>

CSS

.ui-resizable-helper {
    border: 1px dotted #999;
}
#resize {
    background-color: #ccc;
}
.demodiv {
    height: 150px;
    width: 150px;
    float: left;
    margin-left: 5px;
}

JavaScript

$('#resize').resizable({
    helper: "ui-resizable-helper",
    grid: [10, 10]
});