I have scroll div image like this
HTML CODE
<div class="side">
<div class="data" id="data-1">
<img src="https://images.unsplash.com/photo-1600247354058-a55b0f6fb720?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80" alt="">
<span> ID = data-1</span>
<hr>
</div>
<div class="data" id="data-2">
<img src="https://images.unsplash.com/photo-1599687350452-f60014809d2a?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60" alt="">
<span> ID = data-2</span>
<hr>
</div>
...
</div>
CSS CODE
.side{
display: block;
background: salmon;
width: 350px;
height: 100vh;
overflow: auto;
}
.side img{
display: block;
padding: 10px;
width: 150px;
height: 150px;
object-fit: cover;
object-position: center;
}
every image have a unique id like id='data-1'
and then below that, I have a link to go to each image HTML CODE
<div>
<ul>
<li>
<a href="#data-1">Link to image id data-1</a>
</li>
<li>
<a href="#data-2">Link to image id data-2</a>
</li>
<li>
<a href="#data-3">Link to image id data-3</a>
</li>
<li>
<a href="#data-4">Link to image id data-4</a>
</li>
<li>
<a href="#data-5">Link to image id data-5</a>
</li>
</ul>
</div>
by default when I click a link I the windows page is going top. that's what I want to avoid
and the result I want is the data is still on the top of the div scroll page, but the windows page is not going to anywhere
