CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
JavaScript Jungle
[Solved] Remove the #string from the end of a url
noahgelman
Permalink to comment
#
March 2012
I believe this is a client side issue.
I have a link that links to a div on another page.
www.example.com/#div-3
I want the page to still navigate to that div, but I want the #div-3 removed from the url without refreshing the page. How can I do this?
chriscoyier
Permalink to comment
#
March 2012
You'll probably have to just let the browser do it's thing at first, then after window.load, look into
https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history
noahgelman
Permalink to comment
#
March 2012
Thanks for the help Chris. It took me a little bit to understand how it's all supposed to fit in but I got it. That did the trick.
Add a Comment
I have a link that links to a div on another page.
www.example.com/#div-3
I want the page to still navigate to that div, but I want the #div-3 removed from the url without refreshing the page. How can I do this?