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 ..
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!
set
id
for each your container of pages (about,work etc.) then sethref
like thisthen use this function
You have to use javascript in order to achieve that. Im not sure you can do it without changing the url, but there is : a nice way to do it.
If you really dont want your url to change, check this post