Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,836 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,836 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)