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

General Discussion

Alcibiades Montas
Alcibiades Montas
5,974 Points

How do I create a navigation bar like this?

Hi guys, I found this really interesting navigation bar that highlights where you are in the page even if you are not touching an specific div? Could you guys tell me how this could be done? Or what would be the name of the plug in?

This is the website:

http://html5up.net/prologue

2 Answers

Ron McCranie
Ron McCranie
7,837 Points

You can build it in JavaScript. Listen for the scroll event, when a div comes into view look at it's id and set the appropriate navigation link to active.

Without spending a little more time inspecting the code I'd say that skel.js (http://skeljs.org/) might have something to do with it. Looks like the panels plugin is what might do what you want. At least I know the site you referenced is using it.

Alcibiades Montas
Alcibiades Montas
5,974 Points

Thanks Ron, wanted to build it from scratch so your first two lines help and I can take it from there .
Can you tell me about the uses of the skel.js framework?

Ron McCranie
Ron McCranie
7,837 Points

Dont' really know. I just saw they were using it and googled it which took me to the link I posted in the last response.

Looks like its a JavaScript plugin for building responsive sites. CSS Grid System, Responsive Handler, CSS Shortcuts, Plugin System (includes Panels).

Panels: Adds slick, smart, easy to customize sliding panels and viewport overlays. (from their website)