Treehouse: Grow your CSS skills. Land your dream job.

Internal Links Not Working Once Posted to Web Server

  • # April 10, 2013 at 11:37 am

    I have a website ( The URL redirects to

    Here is the issue I am having. I have internal links from the “main navigation” at the top that are linked to the div ids below. When I test this site locally, everything works as expected. However, once I post to the web server, the links just don’t work. I have triple-checked everything. All of the IDs are correct. On the status bar in Safari 5.1.8 on Mac OS X 10.6.8, it shows that the link is directed to the correct div on the page, but nothing.

    If anyone could could provide some insight, I would be grateful. I am the only web designer at my company and just can’t figure this one out.

    Many Thanks in Advance!


    # April 10, 2013 at 12:52 pm

    Where in your code are you actually calling one of your scrolling scripts?

    # April 10, 2013 at 12:52 pm

    When I click on the links, the URL isn’t update. That’s sounds like there’s some sort of `preventDefault()` going on.

    # April 10, 2013 at 12:59 pm

    When I type in the URL manually, it works. So definitely a JavaScript thing. You are loading a lot of JS files, which one handles scrolling? (too many plugins with name containing scroll so it’s easier to test if I know where to look)

    # April 10, 2013 at 1:06 pm

    Thanks guys! There is actually no JavaScript for the scrolling. It is simply an internal link. Although, your comments make me think that perhaps one of the JavaScript files is causing the default browser behavior to act strangely…

    # April 10, 2013 at 1:15 pm

    Got it figured out. One of the “scrolling” .js files was causing the issue. Deleted them and got it working. Now to make it a little more elegant…

    Thank you both for your help. It led me to the problem.

    # April 10, 2013 at 1:51 pm

    Any time!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.