DEV Community

Pandademic
Pandademic

Posted on

Like im 5:What is JQUERY???????

What is Jquery?

Top comments (29)

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

In the old days, before Chrome and Firefox, when Internet Explorer wasn’t even a decade old, Netscape Navigator was still a major part of the browser market share, and ECMAScript 3 was the core basis for JavaScript, the DOM APIs were very different. Those differences mostly involved requiring you to manually traverse the DOM to find groups of elements that matched specific criteria. Essentially, you had to implement document.querySelector() and the various related functions yourself, and event handling was rather more complicated (and less consistent).

Because of how crappy the DOM APIs were early on, one of the big things at the time was to write libraries to make them better (as is normal for programmers to do). jQuery was one of the most successful such libraries (Prototype is another early example that held on for a long time), providing both an easy way to select elements or groups of elements using CSS selectors (this functionality was earth-shattering when it was first implemented, though I do not recall if jQuery was where it first came into being) and much nicer event handling, as well as some nice utility functions for things like JS-powered animations or AJAX networking functionality.

Over time, a significant percentage of the functionality in jQuery has either been added to the DOM APIs (most significantly including the element selection functionality and much, but not all, of the event handling improvements) or implemented in other ways in the usual web tool stack (for example, many of the basic parts of the animations are now in CSS). However, jQuery has hung on due to the huge amount of other things that depend on jQuery (for example, Bootstrap only got rid of their dependency on jQuery with Bootstrap 5 a few months ago).

Collapse
 
pandademic profile image
Pandademic

Thank's for the history & explantaion!

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

jQuery is this old thing that a lot of people used to use (a few still do). It is a library wrote in JavaScript, it is nothing special but became so popular because it made JavaScript easier to write back in 2012. It has no specific purpose but it is particularly good at working with the DOM.
jQuery's legacy is that now modern JavaScript has many of the features jQuery offered.
I would think twice about using it.

Collapse
 
pandademic profile image
Pandademic • Edited

So it's Old , but great for DOM?

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

No Matter how silly the question, you would get better answers with more specific questions but yes that's correct.

Old but good with DOM manipulation

Thread Thread
 
pandademic profile image
Pandademic

Thank you!

Collapse
 
xorock profile image
xorock

Not only for DOM. It has great event system (super easy delegation, namespaces), quite nice ajax support.

Thread Thread
 
pandademic profile image
Pandademic

Oh , Thanks !

Thread Thread
 
superloika profile image
Kaloy

There are so many powerful plugins made with jQuery too. (like advanced data tables, charts, and so much more)

Thread Thread
 
pandademic profile image
Pandademic

Oh , Nice !

Collapse
 
bemmio profile image
Edward Mike

Stop contradicting yourself..,
"no specific purpose but it is particularly good at working with the DOM."
"Β it is nothing special but became so popular because it made JavaScript easier to write back in 2012"
What have you done yourself, that benefited the world

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

I raised an autistic son and taught him to use sign language in the middle of a pandemic, what about you?

Thread Thread
 
bemmio profile image
Edward Mike

I guess that's not to the world,its your son..not a library or language, be humble

Thread Thread
 
adam_cyclones profile image
Adam Crockett πŸŒ€

having "no specific purpose" is exactly equal to "general purpose". It is not negative and you you attack me for it personally! I have done literally nothing wrong here. I have learning difficulties which affect my ability to communicate and you apply a negative tone and literally ask me what am I worth as a human.
Teaching my child is a contribution to the world. Helping thousands of foster childre ln is another. So I again I ask you what the heck is making you so hostile I have done nothing wrong here!

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

Hahaha okay why?

Thread Thread
 
pandademic profile image
Pandademic • Edited

Why did I ask the question?

Thread Thread
 
adam_cyclones profile image
Adam Crockett πŸŒ€

Hi pandademic, I totally understand why you asked the question it's 100% valid. Unfortunately my style of writing is not always clear to some people and often I get misunderstood. I am sorry for hijacking your post. I can delete this thread if it helps?

Thread Thread
 
pandademic profile image
Pandademic • Edited

No , it's fine. I didn't see you were replying to someone. I thought is was a separate comment , & you were asking what why I asked about jQuery . Also , Great article about choosing the right raspberry pi , it helped very much!

Collapse
 
domonic profile image
domonic

instead of typing document.querySelectorAll() you can use $()

everyone prefers this so it will always be around. Some snobs spend 5 years learning to do js a hard way through various compilers etc will tell you its bad because their way is better. but it isn't. Their way is non standard html tags, no page on load, bad seo etc. But really jquery is a great way to manipulate an existing standard dom and always will be. Sadly chromescript will probably do somethign to block it in several years to push everyone onto their dogshit platform therefore breaking lots of websites.

Collapse
 
pandademic profile image
Pandademic • Edited

So jQuery adds $() , & a better way to manipulate the standard DOM?

Collapse
 
domonic profile image
domonic

well it also has $.get(something) for ajax calls. and a $('#mytag').html('new content') to replace shit. which is just about all you need for an SPA. also some shorthands for event listneners. i.e. $('.somebutton').on('click') basically you use that dollar to access this API api.jquery.com/ and it can be applied to any selector you pass into the dollar. It used to be more useful as well for its array methods but now they are built into js so less required for merging and extend and looping for people who couldn't be arsed to type a for loop.

Collapse
 
orsenthil profile image
Senthil Kumaran

Javascript was a programming language developed to add animations to static HTML pages. Webpages had have tree like structure, which is called Document Object Model (DOM). Javascript didn't have anything special to work with DOM.
JQuery, a javascript library, made it easier to work with DOM, and started a revolution in 2012.

Collapse
 
bemmio profile image
Edward Mike

We need to appreciate the work put in by men to make life easier,most of the comments speaks negatively about jquery,but in its time,it benefited everyone, great companies used it,even employed those who knows it well,some are still using Jquery.

Today, its react,Vue,Angular,Ember, they will fadeout tomorrow, that doesn't mean we should speak bad of this tools.

Take this,anytime you want to speak negative about a tool,as yourself, what have you done yourself

Collapse
 
sulaimandev profile image
Muhammad Sulaiman

jQuery is a bunch of code written in JavaScript

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

This is very accurate ☺️

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

Oh yes and $() is just a function named dollar. I once believed that it wasn't and that jQuery was a language due to confusing job descriptions and inexperience.

Collapse
 
pandademic profile image
Pandademic

Oh , Thanks!

Collapse
 
polterguy profile image
Thomas Hansen

An obsolete JavaScript library that was used mostly to eliminate differences in browsers. Over time additional features was added to it, such as animations, etc, and it did provide some syntax advantages over "vanilla JavaScript", but over time it became mostly obsolete and replaced by more mature frameworks and larger things such as React and Angular. 10 years ago you would use it in 99% of your projects. Today you will probably only use it in 1% of your projects - Assuming you were creating frontend web stuff manipulating the DOM that is ...

If you have to ask you're better of learning Angular or React, I'd recommend Angular since it's an easier beginner framework ...

Collapse
 
domonic profile image
domonic

cool

Some comments may only be visible to logged-in visitors. Sign in to view all comments.