Runs the code to update the menu position on page load