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.

JavaScript jQuery Basics (2014) Introduction to jQuery What is jQuery?

Even though the video title is "What is jQuery" I walk away still not sure what it is or why we use it.

I've watched Andrew's beginning videos on jQuery now 3 times, and I'm still not understanding what jQuery is other than some kind of library of...commands? Can someone explain what jQuery is, why/when we use it, why the $ sign works as an abbreviation for jQuery, and what the DOM is that he introduces at the end of the video?

3 Answers

Jesus Mendoza
Jesus Mendoza
23,274 Points

Have you tried watching the Introduction to jQuery course?

This is probably one of the worst courses available here,i don't even know why it's included in the Front-End track. Feels like it was made in a rush,i see no connections between the lections etc. It made me sad,because learning here was(and is) going really smooth exept this "jQuery course".

Possibly helpful, too, is Chalkley's Beginner’s Guide to jQuery listed in the Teacher's Notes.

jQuery is a JavaScript framework that solves the following problems:

  1. It smooths out inconsistencies that JS has across browsers. In this sense, it's similar to what normalize.css does for styling pages.
  2. It saves loads of time. What might take 10-20 lines of code in vanilla JS will only take one in jQuery.

In short, you can add interactivity to your site, without having to worry about inconsistent user experience or site performance.

That said, there are disadvantages. If JS is disabled in the browser, for example, jQuery won't work. So, I wouldn't recommend using it for simple animations or interactions; CSS is more reliable.