What's the point of jQuery?

I just finished the jQuery module, and while I suppose the animations are… interesting, I don’t understand why you wouldn’t do all the modifying that was presented with CSS.

Were the challenges in the jQuery module just super-introductory, and there are more useful functions to be had? Am I simply a newbie who will appreciate jQuery more in the upcoming projects? :smile:

4 Likes

jQuery handles more than animation, including things like simplified AJAX requests or more dynamic DOM manipulation.

One of the real strengths of jQuery is how compatible it is across browsers. You can implement something once in jQuery that requires lots of vendor prefixing in CSS.

That said, jQuery is relatively old technology now, and many newer CSS and JS frameworks / libraries / techniques have solved the problems jQuery solved first in more lightweight, modern ways.

6 Likes

Do you mind dropping a few names? :yum:

1 Like

If you don’t know why JQuery is good, or what it’s used for, then you don’t need to learn another framework yet… it will only slow down your progress.

JQuery makes a ton of shit easy, and you’ll come to learn this when you have to make API calls, event actions, animation and a bunch of other stuff. The intermediate projects will really bring this home.

2 Likes

Any hot new thing probably tries to replace some aspect of jQuery - Bootstrap, Materialize (CSS), React, Angular (JS) etc…

oh! Ok ! hmmm I still want to know more about jQuery, it’s all right, isn’t it?

Yep - definitely learn jQuery, it won’t be a waste and it’ll make lots of stuff easier for you.

While jQuery isn’t that fashionable these days, it’s still powering most of the internet as we know it.

2 Likes

jQuery maybe isn’t so popular as other more modern technologies, but it is really widely used, so if you plan to be web developer, you should learn it (it ain’t very difficult too, so why not to learn). However, maybe you should learn how to do things with vanilla JS first and then see how jQuery simplifies some of them, then it will be more clear why it’s useful. Of course, there is an opinion that vanilla JS is good by itself and you don’t need jQuery (google “you don’t need jQuery” to learn more). But my opinion is that you still should learn basics of it, at last then you won’t be confused if see it in some legacy code.

1 Like

absolutely - I saw that with Tic Tac Toe and Simon Game - it was a mess of js selectors and jQuery selectors and I thought it was bad, it also showed I couldn’t understand the actual difference and WHY it’s different.

Also I heard that if it can be done with Javascript you shouldn’t necessarily use jQuery because it’s calling on a rather heavy library. I thought it was worth considering.

I’ve also read that interacting all with the DOM is great but also energy consuming and so we’d better know why and when do it.

Basically I’m learning. :grin:

This is where i learned my jquery starting off … and i found it very good … and anytime im working with html css i still use jquery

3 Likes

This blogpost makes it all really clear:

http://blog.garstasio.com/you-dont-need-jquery/why-not/

1 Like

Hola!

Okay you know what, it’s sometimes weird when someone asks you what’s the use of railways when I can just use my bicycle…

Well, I think jquery is there for a reason, and it’s there for making things go fast. It takes more time to reach the small ol’ town in that bicycle. I mean, when you have a spacious train with smooth straight travels, why bother about bicycles? :city_dusk:

Well anyways, if you think you can build a better framework or will be comfortable with vanilla icecream :ice_cream:, shed some light! :smiley: :sunny: :sunglasses:

anyways, there goes my lore. :blush:

2 Likes
  1. You can learn the basics and start using it very soon to manipulate the DOM (ie. make things happen in the browser).
  2. It can be a gentle/fun introduction to libraries/DOM manipulation in general.
  3. You can build a prototype quickly without setting up an environment or adhering to some design pattern/framework bias.
  4. Some frameworks use jQuery or its syntax.

Number 3 is my favorite.

3 Likes

Thanks everyone! I think the challenges threw me off because they were essentially just re-doing everything we did with CSS and I was like why though??? haha.

I can definitely appreciate these other uses.

1 Like

A splash of jQuery can make a normal, boring website or web app a 1000 times better and more appealing. I love it and it’s sad to hear it’s not an “in” thing in the industry anymore. I’ll end up moving away from it when I start learning newer languages like React and Angular but for now I use it left and right. I don’t care what’s “in”, I care what works - and most likely the majority of your clients/bosses are going to feel the same way.

I’ll end up moving away from it when I start learning newer languages like React and Angular

Angular 1x includes"jqlite", an API compatible subset of jQuery.

Angular 2 omits jqlite. But there’s no real reason you can’t use jQuery with angular.

1 Like

I recommend Code School’s FREE jquery tutorial as an intro to the basic things it’s useful for and how to use it: Try jQuery.

To beat a dead horse though, it’s just as important to learn how to do the DOM manipulation with pure JS. Also, outside of my FCC Front-End projects, I haven’t found a need to use it. Some might say it’s easier/simpler/faster to through in a CDN link for jQuery for a small front-end project instead of spooling up a big webpack project for Angular or React, BUT… here’s where I’ll recommend another nifty new framework: Vue.js 2.0 [https://vuejs.org/v2/guide/]. It allows you to use a CDN link for simple DOM needs as well as big a build webpack project for MV* single-page apps.

There are also very real reasons to move on from jQuery to one of the front-end JS frameworks du jour, including performance, good design, etc. Yes, jQuery works, but for anything more complex than landing pages, it doesn’t work that well by comparison.

Hey cbirk, I had the same doubt when going through FCC jQuery module, thanks for asking this question :wink: I am also doing Colt Steele’s bootcamp on Udemy and I see that the jQuery part seems a bit more developed than on FCC, will see how it goes.