Skip to main content

Search and Top Navigation

Ticket #4666: alsoresize.html
File alsoresize.html, 1.9 KB (added by Mikko Rantanen, July 10, 2009 07:02PM UTC)

Demonstration of the ticket

<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://jquery-ui.googlecode.com/svn/tags/1.7.2/themes/base/ui.all.css" />
<style>
    div.alsoResizeBug { background: red; }
    div.alsoResizeFeature { background: green; }
</style>
<script type="text/javascript">
$(function() {
    $('#resizable1').resizable({
        alsoResize: $('.alsoResize')
    });
    $('#resizable2').resizable({
        alsoResize: {
            '#alsoResizeE' : [ 'width' ],
            '#alsoResizeS' : [ 'height' ],
            '#alsoResizeSE' : [ 'width', 'height' ]
        }
    });
});
</script>
</head>
<body>
<div id="resizable1" class="alsoResizeBug" style="position:absolute;top:20px;left:20px;height:100px;width:100px;">Resizable</div>

<div class="alsoResize alsoResizeBug" style="position:absolute;top:260px;left:20px;height:100px;width:100px;">Does also resize</div>
<div class="alsoResize alsoResizeBug" style="position:absolute;top:20px;left:260px;height:100px;width:100px;">Should also resize</div>
<div class="alsoResize alsoResizeBug" style="position:absolute;top:260px;left:260px;height:100px;width:100px;">Should also resize</div>

<div id="resizable2" class="alsoResizeFeature" style="position:absolute;top:20px;left:600px;height:100px;width:100px;">Resizable</div>
<div id="alsoResizeE" class="alsoResizeFeature" style="position:absolute;top:260px;left:600px;height:100px;width:100px;">Resizes East</div>
<div id="alsoResizeS" class="alsoResizeFeature" style="position:absolute;top:20px;left:860px;height:100px;width:100px;">Resizes South</div>
<div id="alsoResizeSE" class="alsoResizeFeature" style="position:absolute;top:260px;left:860px;height:100px;width:100px;">Resizes South-East</div>
</body>
</html>

Download in other formats:

Original Format