Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
  <script src="http://code.jquery.com/ui/1.11.0/jquery-ui.min.js"></script>
  <title>JS Bin</title>
  
  <style>
     #container {
       overflow: hidden;
       border: 1px solid #000;
       width: 400px;
       height: 400px;
       position: relative;
     }
    
      .inner {
        width: 1000px;
        height: 300px;
      }
    
    .drag {
      border: 1px solid red;
      width: 50px;
      height: 50px;
      position: absolute;
      left: 200px;
      top: 10px;
    }
  </style>
  
  <script>
    
    $(function(){
      $(".drag").draggable();
      $("#container").scrollLeft(100);
    })
  </script>
</head>
<body>
  <div id="container">
    <div class="inner"></div>
    <div class="drag"></div>
  </div>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers