1

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

 2 years ago
source link: https://dev.to/pandademic/like-im-5-what-is-jquery-5eji
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Discussion (28)

CollapseExpand

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.

Comment button Reply

CollapseExpand

CollapseExpand

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

CollapseExpand

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

Thread

Thread

Author

Oct 10

Oh , Thanks !

Thread

Thread

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

Thread

Thread

CollapseExpand

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

Comment button Reply

CollapseExpand

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

Thread

Thread

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

Thread

Thread

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!

Comment button Reply

CollapseExpand

Hahaha okay why?

Thread

Thread

Why did I ask the question?

Thread

Thread

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

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!

Comment button Reply

CollapseExpand

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).

Comment button Reply

CollapseExpand

Author

Oct 10

Thank's for the history & explantaion!

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

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

Comment button Reply

CollapseExpand

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.

Comment button Reply

CollapseExpand

excuse me, querySelector didn't exist when jQuery came

Comment button Reply

CollapseExpand

CollapseExpand

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

Comment button Reply

CollapseExpand

jQuery is a bunch of code written in JavaScript

Comment button Reply

CollapseExpand

CollapseExpand

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.

Comment button Reply

CollapseExpand

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK