Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<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.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
</head>
<body>
  <div id="container">
    <div id="resizable"></div>
  </div>
</body>
</html>
 
#resizable { 
  width: 400px;
  height: 200px;
  background-color: white;
  margin: 0px; 
  padding: 0px;
}
#container {
  background-color: gray; 
  width: 600px; 
  height: 500px;
}
 
$(function() {
 $( "#resizable" ).resizable({
    containment: $('#container')
  });
  $( "#resizable" ).draggable({
    containment: $('#container')
  });
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
tj.vantollpro
0viewers