jQuery UI Resize Alsoresize

Try to resize the cube on the left, and the other one will resize at the same time.
ExampleJquery ui resize alsoresize
Source Code Expand
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<script type="text/javascript" src="http://www.pureexample.com/js/lib/jquery.ui.touch-punch.min.js"></script>

<!-- CSS -->
<style type="text/css">
.square {
    width: 100px;
    height: 100px;
    border: 1px solid black;
    text-align: center;
    float: left;
    margin-left: 10px;
    background-color: lightblue;

<!-- Javascript -->
$(function () {
		alsoResize: "#s2"

<!-- HTML -->
<div id="s1" class="square">I resize, you resize</div>
<div id="s2" class="square" style="background-color:orange">ok</div>

comments powered by Disqus