55
MrDhont
8y

SO: How to ... in JavaScript?

Answer: use jQuery!

SO: How to ... in JavaScript without jQuery?

Answer: use jQuery!

Me: ffffffffffffffffuuuuuuuuuuuuuuuuu I hate j-f*cking-query, I don't want to learn it!!

Comments
  • 7
    Well. jQuery is convenient but of cause you can do without.

    jQuery is built in js.

    You just have to do more boiler plate for your self.
  • 1
    May as well just give up now and use whatever bit of jQuery you need. I've needed it for some little stuff but all I did was pretty much import jQuery code and then copy a few functions from Stack Overflow to make it work how I want. No actual learning of jQuery occurred.
  • 5
  • 0
    jqlite is good for the core functions and not all of the crap that should be done using CSS or vanilla js
  • 1
    What I'm learning is it's not so much the framework/library that's the issue as much as the underlying idea about how to handle the DOM. I started getting more into the newer frameworks like Vue.js and how it handles DOM manipulation. It presents a new way of thinking about the state of your interface/application and how the DOM is changed to reflect the changing state(s).
  • 3
    Isn't the whole point to write less code? When you use vanilla js, you will be jquery free... but whats the result? More code to remake all those things you need which are present in jquery. That way you'll end up with even more (possibly buggy) code, but congrats, you didn't use jquery. I still cannot see why all the hate for a perfectly valid library.
  • 0
    @arekxv somehow it became "not cool" and it's now a meme to hate it
  • 0
    @arekxv my argument against it is that most new developers go straight to it and use it for basic stuff that can be done in regular js but instead they add extra bandwidth to a site that wasn't needed in the first place. now if jquery is actually doing alot use it but if you are using it for toggling a div just use js and cut down on 16kb of extra crap
  • 2
    jQuery is pretty easy and it has saved me a lot of times.
  • 0
    @jckimble For small projects and those things I might agree, but for bigger projects it makes sense to use such a robust and tested library especially with so many device quirks (jQuery does not cover just IE problems anymore) nowadays. :)
  • 0
    Well I guess I'll learn jquery then, tonight... :D
  • 1
    @arekxv I started on dialup before I got stuck on edge, along with that I learned how to write cross browser vanilla js before jquery was around. so even with Internet speeds rising just about everywhere I can't justify including unused code into a website unless it saves bandwidth by making other scripts shorter then it would have been in vanilla js which in the few cases that it is for me is when you are working on effects, if you are copying your logic into the frontend, or your site is live reloading
  • 0
    Use underscore! Less intrusive.
  • 2
    @jckimble on the other hand. If you include jquery from some common cdn as googles. Odds are that the visitor already got a cached copy localy and dont have to downloaf it.

    Also, vue and other frameworks sets limits by requirering another template format that gives tje framework controll over what is chaned when.

    This makes it easier to make more efficient changes.

    Jquery cannot make the same assumptions but you as a programmer can do some of it by building new nodes completely before appending them.

    Also, working with document fragments speed up things since no redraw events are called on fragments.
  • 2
    Googles hello world in JavaScript

    Result: use jQuery
Add Comment