DEV Community

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

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.