JavaScript is great, and by all means use it, while also being aware that you can build so many functional UI components without the additional dependancy.
Una Kravets (@una) took a look at the power of modern native HTML and CSS as well as some of the syntactic sugar of Sass. Because, you might not need scripts for that task at all! (Note: these demos may not be accessible. Please take a moment to test them in your project before using in production)
You Might Not Need JavaScript