I currently have this code
<a href="/#/routeOne" onClick="hide('page1')" class="next">Next »</a>
which in one click is supposed to display a new page, One.cshtml and hide index.cshtml (the current page). However, it takes 2 clicks in order for this to happen as the first click displays One.cshtml and doesn't hide index.cshtml and the second click hides finally hides index.cshtml.
Here is the code for the hide function if it helps:
function hide(obj) {
var el = document.getElementById(obj);
el.style.display = 'none';
}
I'm also having trouble understanding why index.cshtml doesn't disappear automatically when it is redirected to One.cshtml. I feel like I must be doing something incorrectly in general.