I have a website with a navigation bar. When a link is clicked, it uses the onClick() handler to change the content of a page.
For example. If the about us link is clicked, the page content will change to the about us content, and the URL will become xxxxx.com/#about. However, when linked directly to xxxxx.com/#about it opens the default index.php page.
How do I directly link to the pages, as if it was onClick()?
You need get the
#somethingon page load, and then if it is found, call youronclickfunction with it.