I'm using scrollIntoView function to click on a link and have it jump to a different part of my web app. The issue i am having is that i dont know how to target an HTML element called 'identifier'
so my html looks like...
<div class="subpara" identifier="2b">
<num value="b">(B)</num>
<content>some conent</content>
</div>
I want to be able to target the 'identifier' 2b in this case
i tried using:
onClickOutlineNav(id) {
let element = document.getElementById(id);
//scroll to identifier
element.scrollIntoView();
}
and it doesnt seem to be working..any ideas?