Resize horizontally AND vertically synchronously :
You have two resizable elements: One is supposed to resize vertically. The other one
horizontally with the resizable widget - alsoResize (Def: You use it to resize one or more
elements synchronously with the resizable element).
So when you resize the horizontal element, it should resize in width only. The vertical
element should be resizable in height only.
I have tried everything what was suggested here (and more) :
Here is my try (Thanks for fixing, user):
<html>
<lang="en">
<header>
<meta charset="UTF-8">
<link rel="stylesheet"
href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
</header>
<body>
<div class="cross">
<div id="horizontal">
<h3>HORIZONTAL</h3>
<div id="vertical">
<h3>VERTICAL</h3>
</div>
</div>
</div>
<style>
body {
background-color: gray;
width: 100%;
}
#horizontal {
width: 280px;
height: 2px;
background-color:white;
position: relative;
left: 540px;
top: 400px;
}
#vertical {
width: 2px;
height: 550px;
background-color:white;
position: absolute;
left: 140px;
top: -260px;
}
#horizontal h3, #vertical h3 {
text-align: center;
margin: 0;
}
.cross {
position: absolute;
height: 20px;
width: 200px;
}
</style>
<script>
$(document).ready(function () {
$( "#vertical" ).resizable({
alsoResize: "#horizontal",
handles: "n , s"
});
$( "#horizontal" ).resizable({
handles: "w , e"
});
});
</script>
</body>
</html>
Hope, I was clear enough.