Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Linking to a div in one page jqscroll

Hi,

I have a simple one-page site using the fullPage.js plugin from Alvaro Trigo. I have one problem tho: as you see the arrow that says get links down to the section below. However, when I click it it adds a blank white section below the site and also makes it impossible to scroll up again.

What am I doing wrong?

http://andhighfield.com/beta/

2 Answers

I took a quick look at the documentation and it's looks like you forgot to set up your configuration for the links. Check this out... https://github.com/alvarotrigo/fullPage.js#creating-links-to-sections-or-slides

$('#fullpage').fullpage({
    anchors:['firstPage', 'secondPage', 'thirdPage', 'fourthPage']
});

I have a working example, i would post a link however i do not have the ability to add assets to my codepens :(

Edit: I uploaded my example to my own webserver for you to check out Check this out Hope this helps :thumbsup:

Oh, I feel stupid. Thank you so much that was very helpful!

No problem man. You brought my attention to a pretty cool plugin! Thank you :thumbsup: