I'm loading an image inside a div #popup, which is inside a main wrapper called #main
#mask {
display: block;
position: fixed;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.84);
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
overflow-y: auto;
overflow-x: hidden;
}
and
#popup {
display: block;
position: absolute;
top: 30px;
max-width: 960px;
z-index: 9999;
background-color: #efefef;
height: auto;
left: 80px;
right: 80px;
margin: 0 auto;
margin-bottom: 80px;
}
with jQuery i load an image inside #popup and i can scroll it up and down, but when i close the overlay and I load another image, the image is not visible form the top...it maintains the same scroll position when i left/close the first image...
dunno why...how can I reset it without resetting the whole page?
$('#popup').scrollTop(0);
seem is not working...