Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div class="menu">
    <div id="i1" class="item">
      1
    </div>
    <div id="i2" class="item">
      2
    </div>
    <div id="i3" class="item">
      3
    </div>
    <div id="i4" class="item">
      4
    </div>
  </div>
  <div id="img-frame" class="img-frame">
    <div class="img">
      тут изображение
      </div
  </div>
</body>
</html>
 
.img-frame{
  float: left;
  overflow-y: scroll;
  width: 300px;
  height: 200px;
  background: lightblue;
}
.img{
  overflow: scoll;
  width: 200px;
  height: 1800px;
}
.menu{
  float: left;
  margin-right: 10px;
}
.item{
 margin: 10px 0;
  cursor: pointer;
}
 
window.onload = function(){
  $('#i1').click(function(){
     document.getElementById('img-frame').scrollTop += 300;
  });
};
Output 300px

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