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
Rigo Gomez
Courses Plus Student 178 PointsWhat is the difference between J Query and JavaScript ?
I am new to Coding and trying to understand what JQuery is and Javascript is ?
2 Answers
Alison Brodribb
24,615 PointsJavaScript is the programming language that you use to add interactivity to webpages.
JQuery is a JavaScript library which you can use to simplify your coding - rather than having to create JavaScript applications yourself, you can instead utilise the JQuery library in order to use JavaScript applications that other people have already created.
Kevin Korte
28,149 PointsI'll elaborate - jQuery is more or less an api for the javascript language. The creators of jQuery created an easier, simpler syntax for many common DOM manipulation tasks that developers often do on every project.
Let's say you wanted to select an element.
In pure javascript you'd have something like
document.getElementById('my-selector')
In jQuery, it's just simply
$('#my-selector')
You can see how much more tighter, simpler, and CSS like the same jquery selector is.
All jQuery really does is parse the jQuery back down to pure javascript so the browser can do something with it. It gives us easier to work with functions and selectors.