Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<title>Resizing Div</title>
<script type="text/javascript">
  
  
  $(document).ready(function(){
    var check = false;
    var frame = $("#frame");
    $(document).mouseup(function(e) {
        check = false;
    });
    $("#frame").mousedown(function(e) {
        e.preventDefault();
        check = true;
    });
    $(document).mousemove(function(e) {
        if(check) {
          frame.height(e.pageY );
          frame.width(e.clientX);
        }
    });
});
</script>
</head>
<body>
    <h1>Resizing test</h1>
  <div style="width:300px; height: 300px; padding: 10px; border: 1px solid red; overflow: scroll;">
    <div id="frame" style="border: 1px solid green; height: 350px">
        <div style="height: 100%">hello how are you</div>
        <span id="frame-grip" style="display: block; width: 100%; height: 16px; background: gray">yyyy</span>
    </div>
    </div>
</body>
</html>
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers