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 Using jQuery Plugins Add a Sticky Navigation Bar This Section's Project

Roald Jurrian Kamman
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Roald Jurrian Kamman
Front End Web Development Techdegree Graduate 15,543 Points

Sticky bar with regular CSS vs JQuery plugin.

Are there any advantages of using a JQuery plugin versus making a sticky bar myself using simple CSS? It's pretty easy so I don't know why I would go through the hassle to manually install a plugin.

1 Answer

Steven Parker
Steven Parker
229,732 Points

I suppose it depends on the nature of the "sticky" effect you want to achieve, but assuming the end result looks the same I would think CSS is the better choice. Not just to avoid loading a plug-in, but CSS is typically optimized in the browser so it runs more efficiently.