Forums

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

Home Forums JavaScript Smooth Scrolling Snippet Stopped Working – Help?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40761
    megancarroll
    Participant

    Hey friends. I had implemented Chris’ [Smooth Scrolling snippet](https://css-tricks.com/snippets/jquery/smooth-scrolling/ “Smooth Scrolling snippet”) on my homepage and it was working wonderfully UNTIL I decided to rebuild my homepage. Now it’s not working at all.

    Here’s a bit of history on what I did. I’m trying to build a single-page scrolling website. Originally, I created a page in WordPress and inserted 3 divs called ‘about,’ ‘work,’ and ‘contact.’ I implemented the Smooth Scrolling snippet, and everything was working nicely. However, then I decided to do some more research during which discovered the magic of WordPress custom post types. I decided to rebuild my homepage with a custom template (page-include.php) that uses WP_query to include 3 different pages. Two of the pages (‘about’ and ‘contact’) are actual WordPress pages, but the third (‘work’) is just a custom loop pulling my custom post type. Long story short, when I went to Settings > Reading and changed the homepage to direct to the new page, the smooth scrolling stopped working. When you click on the links in the nav bar, the page jumps to the appropriate spot, but it doesn’t scroll at all. I’m confused, because I didn’t touch the javascript at all. **Any ideas on why it stopped working?**

    If it helps, [here’s my site](http://www.mcography.com/test/ “my site”). Also, if you’re wondering, I’m using Roots.

    #114213
    megancarroll
    Participant

    If you’re having the same problem, [here’s an answer on StackExchange](http://stackoverflow.com/questions/13354968/smooth-scrolling-stopped-working-what-am-i-doing-wrong “smooth scrolling answer”).

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