One-page navigation – remove # in url when using anchor tags in WordPress menu

I have a site with menu tabs: Home, About, Work, Contact.
I’m using anchor tags for this one-page navigation.

But I don’t want my url to update to something like this – http://example.com/#about or ../#work ..

Read More

I just want simply the default url on the address bar (http://example.com/) whenever I click on the menu tabs and jump to different sections of that one page.
I don’t want to update the address bar.
How can I do that?

Thank you so much!

Related posts

Leave a Reply

2 comments

  1. set id for each your container of pages (about,work etc.) then set href like this

    <a href="javascript:myscroll('about');">About</a>
    

    then use this function

    <script type="text/javascript">
    function myscroll(myID){
        var offset = jQuery("#"+myID).offset()
        window.scrollTo(0,offset.top);
    }
    </script>