You might not need jQuery

Поділитися
Вставка
  • Опубліковано 3 жов 2024

КОМЕНТАРІ • 107

  • @rahulxcr
    @rahulxcr Рік тому +105

    jQuery was the king in it's time. Awesome libraries were built with jQuery.

    • @uncertaintytoworldpeace3650
      @uncertaintytoworldpeace3650 Рік тому

      Okay? Name one.

    • @JonnyJKF
      @JonnyJKF Рік тому +5

      I think it's fair to say that many browser APIs were shaped by popular jQuery conventions.

    • @JonnyJKF
      @JonnyJKF Рік тому

      @@uncertaintytoworldpeace3650 jQuery UI was the first prolific component library for the web and its datepicker was the golden standard for its time. jQuery Validation was the go-to option for user-frienedly form validation whether purely client side or via ajax. A lot of what we now have in native browser components required a jQuery plugin back in the day.

  • @ky3ow
    @ky3ow Рік тому +53

    I think addEventListener returns undefined, and to actually remove listener you need to do something like
    function handle(e) {}
    element.addEventListener("click", handle)
    And then
    element.removeEventListener("click", handle)

    • @jeffreytgilbert
      @jeffreytgilbert Рік тому

      I thought for a second when watching the video i had somehow been doing this wrong forever.

    • @Mathhead2000
      @Mathhead2000 Рік тому +2

      let handle;
      target.addEventListener(eventType, handle = function(event) { ... });
      target.removeEventListener(eventType, handle);

  • @yalmeme
    @yalmeme Рік тому +6

    Jquery is still insanely good and useful because of big community, TONS of plugins and libs based on it and some cool easy features like :contains, ajax etc.

  • @technolus5742
    @technolus5742 Рік тому +10

    Pretty much the whole time you could replace jquery with that plain js... jquery still resulted in simpler and more readable code and handled some compatibility details so you dont have to.

  • @OzzyTheGiant
    @OzzyTheGiant Рік тому +20

    Vue replaced jQuery for me, but now Svelte replaced Vue for me.

    • @gokaymehmet6847
      @gokaymehmet6847 Рік тому +1

      Why did u prefer svelte over vue?

    • @ai7593
      @ai7593 11 місяців тому

      Petite-Vue to be specific

  • @rign_
    @rign_ Рік тому +6

    To effectively use libraries such as jQuery or React, it is important to first learn the language and have a solid understanding of its fundamentals.

  • @sam-nc8zv
    @sam-nc8zv Рік тому +2

    You can do all those stuff in a neat way using JQ..
    I won't mind including it in my code it's not of a big deal though

  • @davidmutua6971
    @davidmutua6971 Рік тому +15

    jQuery wins when traversing the DOM especially nested deep. Haven't used jQuery for like 3 years now. Moved to Vue and write Modern JavaScript instead.

    • @Vietnamkid1993
      @Vietnamkid1993 Рік тому +1

      Woah another Vue developer ❤

    • @davidmutua6971
      @davidmutua6971 Рік тому

      Day to day I code in Vue + Laravel. Am a full-stack dev.

    • @seniorcside1881
      @seniorcside1881 Рік тому

      Oh, sorry, I didn't see about Laravel (PHP). Yes, you are really far from modern backend and frontend development tools.

    • @DominicNweze
      @DominicNweze Рік тому

      ​@@seniorcside1881what? PHP is literally still used for webdev till today even more than python.

    • @pau1phi11ips
      @pau1phi11ips Рік тому

      ​@@seniorcside1881🤡

  • @simonjanca
    @simonjanca Рік тому +1

    After few years with TS, React, I avoid JQuery wherever

  • @Nekroido
    @Nekroido Рік тому +1

    Skimming through jQuery's source code gave me a good impression of how fragmented and immature the frontend ecosystem was at the time. Borderline angry comments about weird workarounds they had to come up with for old or exotic browsers and stupid vendor prefixes

  • @Tork789
    @Tork789 Рік тому

    Me who has been using React and Vue exclusively for the past 5 years: huh, interesting.

  • @shaileshjaiswar8581
    @shaileshjaiswar8581 Рік тому +1

    What about the animation that jQuery provides, it's comparatively easy

  • @minhthungo5693
    @minhthungo5693 7 місяців тому

    I don't think Vanilla JS is simpler than jQuery. If you're considering replacing jQuery with another library, I believe that using a front-end framework like React or Vue would be the best choice

  • @Ca-rp7bv
    @Ca-rp7bv Рік тому +24

    someone that is still writing jquery will still be talking about IE support xD

    • @YamiSuzume
      @YamiSuzume Рік тому +4

      IE support is a thing for some use cases. I work for Meta-Shopsoftware and we supported IE for a long time, since shopping can be done on nearly every PC, even if its 20 years old

    • @yalmeme
      @yalmeme Рік тому +5

      Jquery is still insanely good and useful because of big community and TONS of plugins and libs based on it.
      you "joke" mostly mean you just never used it or dont even code any frontends

    • @YamiSuzume
      @YamiSuzume Рік тому +2

      @@yalmeme its the opposite. I work at frontends the whole day, therefore I know that JQuery is very replacable overhead and a thing of the past. Every dependency you can get rid if is a good one. JQuery definitely is one of those.

    • @yalmeme
      @yalmeme Рік тому

      @@YamiSuzume so, what you are using instead? vanilla js?

    • @YamiSuzume
      @YamiSuzume Рік тому

      @@yalmeme depends on the case. Im working on shopsoftware, in our storefront we use bootstrap and therefore mostly vanillaJS. In our administration, we use VueJS, where any classic form of querySelector is the wrong approach anyway.

  • @ChildrenOfDemiurgos
    @ChildrenOfDemiurgos Рік тому

    This dude just taught us JQuery haha. Now let’s just add all those methods to the “element” element so we can use fakeQuery instead 😂

  • @asagiai4965
    @asagiai4965 Рік тому

    but JQuery is based on this principle. They just make it shorter.
    In fact I would argue that querySelector is the basis of JQuery

  • @ER-kz4dp
    @ER-kz4dp 6 місяців тому +1

    Jquery still alive and kicking my friend

  • @Sway55
    @Sway55 Рік тому +1

    if for nothing, Jquery is a must for AJAX

    • @YamiSuzume
      @YamiSuzume Рік тому

      Well, no. Not these days.

    • @Sway55
      @Sway55 Рік тому +1

      @@YamiSuzume you are telling me you do AJAX requests without jquery? you are a mad man

    • @YamiSuzume
      @YamiSuzume Рік тому

      @@Sway55 Why should I? We aren't in the early 2000's, so it's no problem. There's axios or the fetch API for example

  • @natebyrd5107
    @natebyrd5107 5 місяців тому

    Thanks for making this video

  • @leonelmunozlopez
    @leonelmunozlopez Рік тому +7

    10 years ago ❤

  • @Ebakoba
    @Ebakoba Рік тому +7

    True since 2017.

  • @guestguest8278
    @guestguest8278 11 місяців тому

    It is just faster to type out $() in stead of document.querySelector() even with autocomplete

  • @nadjinmalade8738
    @nadjinmalade8738 11 місяців тому +2

    Jquery is the king

  • @PostMeridianLyf
    @PostMeridianLyf Рік тому +1

    display = none causes layout shift, you can use display = invisible to avoid layoutshift

    • @QwDragon
      @QwDragon Рік тому +3

      There is no such value/ Maybe you ment visibility: hidden?
      Anyway, they are for absolutely different usecases.
      By the way, you can use element.hidden = true if you add [hidden] { display: none !important } to css (by default this styles goes without important).

  • @TiC0O0
    @TiC0O0 Рік тому

    Who unironically still uses jQuery in 2023?

    • @Dev-Siri
      @Dev-Siri Рік тому

      I've visited many websites where I see 90kb of JQuery running down the network. (Seriously, thats bigger than React & Vue COMBINED)

  • @WaliaIbex
    @WaliaIbex Рік тому +2

    How about ajax ? Do you have easy way in js

    • @codelif
      @codelif Рік тому

      Only reason I use jquery

  • @Guy_Sandler
    @Guy_Sandler Рік тому +1

    I started using svelte, which replaced jQuery for me

  • @bulent2435
    @bulent2435 Рік тому

    No more jQuery.

  • @UmarJAN-bz2nq
    @UmarJAN-bz2nq 3 місяці тому

    i like js but is there any method to send request whithout submit button in js 🤔🤔?. jQuery can do it .

  • @1010tiller
    @1010tiller Рік тому

    element.classList replaces .addClass / .removeClass and element.dataset replaces .data

  • @knexman427
    @knexman427 Рік тому +4

    I dunno, I think every case you described was better done with JQ

  • @Landonismo
    @Landonismo Рік тому

    None of these are new JS features

  • @zainulabideen8859
    @zainulabideen8859 11 місяців тому

    What about jQuery datatables?

  • @j.r.r.tolkien8724
    @j.r.r.tolkien8724 3 місяці тому

    Might? Seriously?

  • @popetgirl
    @popetgirl Рік тому

    alpine js replaced jQuery for me. No need Vue, React or other big framework for simple job

  • @fredbcruz
    @fredbcruz Рік тому +1

    pretty sure the part about removing event listeners is wrong

    • @ky3ow
      @ky3ow Рік тому

      It is, i wrote the correct way in other comment

    • @fredbcruz
      @fredbcruz Рік тому

      @@ky3ow or you can pass a signal from an abort controller when you add the event listener, and later call the abort method of the controller

  • @dabbopabblo
    @dabbopabblo Рік тому

    Nothing about that remove event listener part was right at all

  • @frosty1433
    @frosty1433 Рік тому +2

    If you still use jQuery you don’t know JavaScript

  • @wassupbaby8634
    @wassupbaby8634 Рік тому

    Is jquery a framework or a language?

    • @Me-vc4sf
      @Me-vc4sf Рік тому

      Neither.....it's primarily a dom manipulation library ....
      It makes writing javascript easy, has poly fills, supports almost all the browsers etc

  • @yadusolparterre
    @yadusolparterre Рік тому

    I've never seen anyone using jquery in 7 years. What's next, you might not need a horse to move around?

  • @yashinox5410
    @yashinox5410 Рік тому

    InnerHtml is good?? What im watching in 20223

  • @nustaniel
    @nustaniel 3 місяці тому

    Never been a fan of what is ultimately bloated code because you need a dependency wrapper that is simply parsing itself to code you can do with vanilla. I am glad the jQuery era is over. Hated it a decade ago, still do. Same is gonna happen to Tailwind and all these other libraries I guess. But sadly I will assume they'll get replaced with other new and shiny, popular, wrappers instead of people moving over to vanilla and learning how things work. Comments on a vanilla tutorial on UA-cam: "How do I do this in React?"

  • @kapraltygrys2603
    @kapraltygrys2603 4 місяці тому

    besss

  • @modernkennnern
    @modernkennnern Рік тому

    "Might not need". That's implying there's a possibility you do.
    Hasn't been needed for like 10 years by now.

  • @Murv
    @Murv Рік тому

    If I ever get into a job and they want me to use jQuery I quit.

  • @silentwave1325
    @silentwave1325 Рік тому

    What about hide(ms) ?
    Or add event for multiple elements?
    js can go ugly sometimes in things jquery still handles pretty well

    • @aschmelyun
      @aschmelyun  Рік тому +2

      Agreed, jQuery is still a beast when it comes to transitions, too

    • @lautarorocha678
      @lautarorocha678 Рік тому

      [HTMLNodeList].forEach( (node) => node.addEventListener(e, fn))

    • @eswarprasad9773
      @eswarprasad9773 Рік тому +1

      ⁠@@lautarorocha678
      Correct and we need to do Array.from(HTMLNodeList).forEach as it's not a type of Array

    • @QwDragon
      @QwDragon Рік тому

      You almost never need to subscribe on several elements. Use event bubbling instead.

    • @cristianbilu
      @cristianbilu Рік тому

      @@QwDragon I think you need it very often, adding events on every child of a list it's something very common

  • @haithem8906
    @haithem8906 Рік тому

    waiiiit.. people still use jquery???
    i stopped using it since 2017~

  • @SEGnosis
    @SEGnosis Рік тому

    vanilla still doesn't have :contains so I'll be using jquery

  • @vasiovasio
    @vasiovasio Рік тому

    Back to the Roots!

  • @wuzimu2323
    @wuzimu2323 Рік тому +5

    jquery is for old people who are not willing to learn modern JS

  • @0Kaliber0
    @0Kaliber0 Рік тому

    What its with ajax? In plain js this is stupid xD

  • @cryptokannada
    @cryptokannada Рік тому

    🔥🔥🔥🔥🎉

  • @Ccb780
    @Ccb780 Рік тому

    JQuery is for the weak! ...or just lazy 😅

  • @stevenstraker5105
    @stevenstraker5105 Рік тому

    Hands down, jQuery was the GOAT of its time, but to be real, the true purpose of it is no longer relevant today. Web APIs and JS on the whole have largely standardized, and the things that aren't, are too new for jQuery. Some conventions may be more comfortable doing it the jQuery way (because it's familiar), but it's easy enough to get used to the modern means of doing those things with some practice.
    Unless you're still supporting an old project that uses jQuery and aren't able to migrate it to a newer codebase, I don't believe there's any *good* argument for using jQuery today other than just personal preference

  • @seniorcside1881
    @seniorcside1881 Рік тому

    2023, man use Jquery and Vanilla js.
    It's like seeing a dinosaur 😂

  • @jakubhalik-rr6sv
    @jakubhalik-rr6sv Рік тому

    have you lost your mind? do not use or teach this anymore, it is very bad for performance to use jquery

    • @cristianbilu
      @cristianbilu Рік тому

      Why is it bad for performance? jQuery is lighter then react and vue

  • @ihateorangecat
    @ihateorangecat 8 місяців тому

    Jquery 🤢🤮
    Vanilla Js 🥹🥹❤

  • @notanobodywithabody
    @notanobodywithabody Рік тому

    Who uses jQuery anymore??? Good lord