The code contains a div
which should scroll to a special id
inside that. I have tried this code, but it does not scroll at all and there is no error being thrown as well.
var divToHighlight = document.getElementById(mID);
divToHighlight.style.backgroundColor ="#F5F0C9";
var topPos = divToHighlight.offsetTop;
document.getElementById("My-Div").scrollTop = topPos;
I have also checked this post but I can't figure out why my code does not work.