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 TJ VanToll

HTML

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

<div id="resize">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>

<div id="output"></div>

CSS

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

#output {
    position: fixed;
    bottom: 0;
}

JavaScript

$( "#resize" ).resizable({
    helper: "ui-resizable-helper",
    grid: [ 10, 10 ],
    resize: function( event, ui ) {
        $( "#output" ).text(
            "Height: " + ui.size.height + " " +
            "Width: " + ui.size.width
        );
    }
});