jQuery UI #4603
http://bugs.jqueryui.com/ticket/4603
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/4603">jQuery UI #4603</a> - <code>alsoResize</code> elements break out of the specified <code>containment</code>.</p>
<div id="parent">
<div id="resizable"></div>
<div class="alsoResize"></div>
<div class="alsoResize"></div>
</div>
CSS
body { padding: 20px; }
p { margin-bottom: 20px; }
#parent {
height: 400px;
width: 300px;
border: 1px solid black;
}
#resizable {
height: 100px;
width: 100px;
border: 1px solid red;
}
.alsoResize {
height: 100px;
width: 100px;
border: 1px solid blue;
}
JavaScript
$('#resizable').resizable({
containment: 'parent',
alsoResize: '.alsoResize'
});