Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Remove the #string from the end of a url

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37234
    noahgelman
    Participant

    I believe this is a client side issue.

    I have a link that links to a div on another page.

    http://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?

    #99460
    Chris Coyier
    Keymaster

    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

    #99530
    noahgelman
    Participant

    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.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.