Grow your CSS skills. Land your dream job.

Smooth Scrolling Snippet Stopped Working – Help?

  • # November 12, 2012 at 6:38 pm

    Hey friends. I had implemented Chris’ [Smooth Scrolling snippet](http://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.

    # November 13, 2012 at 12:26 pm

    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)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".