So as you can see from the code below I'm using a tags to navigate between headers on my webpage. I need to resize some div when the navigation happens, I'm doing this with a JS function that works the way it should when a button is clicked.
However when the user presses the browser's back or forward buttons the javascript function isn't called and the div doesn't resize and this messes up my page bigtime.
Anyone have suggestions on how to fix this issue?
<a href="#header1" onclick="resizeContainer(this)">Go to header 1</a>
<a href="#header2" onclick="resizeContainer(this)">Go to header 2</a>