9

jQuery, because it's a bless when developing web apps.

Comments
  • 0
    Ugh... Just to think of it makes me sweat
  • 0
    @Torbuntu Very true :)
  • 0
    @happycrappie I know, that was my reaction too when I first started using jQuery. It wasn't love at first sight, but now I can't imagine life without jQuery.
  • 1
    @TerriToniAX I acknowledge its power... I've just had to Refactor too much shitty code
  • 2
    @TerriToniAX been there, thought that. But, really, you don't need jQuery.
  • 0
    @jordinebot What do you suggest I'd need instead?
  • 1
    @TerriToniAX First of all, I didn't mean to be rude. If jQuery gets the job done for you, then use jQuery. But, since you asked, I'd say: most uses of jQuery are DOM nodes selection, class & attributes manipulation, Ajax calls & animations.

    When I was using jQuery, a couple of years ago, I thought $ saved me a lot of time and keystrokes, but in fact, it didn't.

    +For DOM selection:
    $(selector) can be replaced by document.querySelector(selector) or document.querySelectorAll(selector)

    +For class & attr. manipulation:
    $node.addClass('class') is the same as node.classList.add('class')

    $node.attr('id', 'newId') is equal to node.id = newId

    $node.is(':checked') equals node.checked

    +For Ajax: Take a look at: https://blog.garstasio.com/you-dont...

    +$.animate() can be replaced by CSS animations + proper class manipulation.

    Also, even if you don't want to overkill things with Angular or React, take a look at Vue.js https://vuejs.org/v2/guide/

    :)
  • 1
    @jordinebot It's cool, I didn't think you were rude :) Yep, all that jQuery does can of course be done with traditional Javascript. But I still find that jQuery comes in handy, that it saves me typing and that my code looks better with it than without it. Thanks for the tip, I'll definitively have a look at Vue.js.
  • 0
    @TerriToniAX Take a look at this screencast https://laracasts.com/series/... for a great first approach to Vue
  • 0
    @jordinebot Thanks, vue.js is really cool! :)
Add Comment