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 jQuery Basics (2014) Creating a Simple Lightbox Preparation

frank colin
frank colin
10,488 Points

Do developers use jQuery frequently rather than programming Javascript?

jQuery is a library for Javascript. So is this question a full 100% yes?

6 Answers

Stoyan Peshev
Stoyan Peshev
6,683 Points

Developers use jQuery for quick (in terms of writing code) DOM manipulation. It's rather preffered than writing different code scenarios for every single browser out there (nightmarish). jQuery is also a dependency for many other libraries. So, short answer - yes.

Alejandro Mesa
Alejandro Mesa
9,813 Points

Well let's see:

  • Five lines of jQuery are equivalent to 25 lines of conventional JavaScript code, which relates to the least amount of “bloat” or extra, unnecessary code. This means smaller files and faster loading web pages.
  • Detailed documentation and useful examples for using jQuery on its website.
  • Works in all browsers and is the most popular JavaScript library currently being used.
  • jQuery is free, open source software.
  • Straightforward to produce powerful and dynamic websites.
  • Web page elements display even if JavaScript is disabled in the browser.
  • Simplifies AJAX.
  • Commands can be “chained” so that the result of one command can then control others.
  • Has a “built-in” set of animation applications that can also be used as commands.
  • Makes basic web pages become really interesting interactive pages with minimal keystrokes.
  • Large software companies, like Microsoft, supports using jQuery in their applications, such as Visual Studio, as evidence of their support of jQuery’s superior product.
  • jQuery can perform all of the fancy animations and transitions as Flash, but in a cleaner, simpler, and more SEO friendly way. I'm pretty sure everyone uses jQuery.
Joseph Perez
Joseph Perez
25,122 Points

Hi Frank,

jQuery is one of the most popular javascript libraries out there so I can't imagine a developer not using it at some point frequently. Preference and project constraints probably also play a part in using it also. Also Stoian is definitely correct, jQuery is also a dependency in many libraries today so sometimes as a developer you're forced to use it. Happy programming though! :)

Yixi Guan
Yixi Guan
7,927 Points

I am still learning, but I think the answer is "yes". I am planning to use other popular tutorials as well only for the jQuery part. I believe that's what you will use to make your portfolio really stand out.

Andrew Federico
Andrew Federico
7,498 Points

Perhaps these answers were more applicable last year, but from what I see, since the IO/sec is much slower than vanilla js, and ECMAScript 5 has excellent cross-browser compatibility, it is much more preferred to use JS when time allows. It will be much lighter, resulting in a much faster experience. http://caniuse.com/#search=ECMAScript%205

If there is a need for older browsers, you can use polyfills.

If you're going to be doing any front-end development for your career, you should not skip jQuery.

You need to pick the best tool for the job. Sure you could write everything in vanilla JavaScript, but that would require more lines of code. You could even replace jQuery with React, but again, more code (and overkill for basic DOM manipulation).

When you get into AJAX event handlers, that's gonna be jQuery as well.

If you plan on strictly doing back-end server-side code in Node, you won't be using jQuery. But if you have no intentions of ever doing any front-end work, you should probably skip JavaScript altogether and learn PHP, Ruby, Python, etc.