I have draggable and resizable div contained within another div. dragging the div snapping to grid is fine but when i resize the div the height always shrinks. Can anyone see a obvious reason why?
my code is:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<style>
</style>
<script>
$(function () {
$("#dv_ch").draggable({ axis: "x", containment: "parent", grid: [10, 10] });
});
$(function () {
$("#dv_ch").resizable({ grid: 10, containment: "parent" });
});
</script>
</head>
<body>
<div id="dv_ch_parent" style="height:50px; width:480px; border:1px solid black;">
<div id="dv_ch" style="width:10px; height: 48px; background-color:blue;">
</div>
</div>
</body>
</html>