I have yet to see a non-trivial example of JQuery accomplishing anything with significantly fewer lines than a vanilla js + css + html approach. What I have seen a lot of is the opposite... long and convoluted meandering nonsense.
If "simple dom manipulation" is all you're talking about, well, I still can't fathom why anybody would use it. There are a couple of examples where it requires fewer lines to do is extremely simple things, but it's pretty easy to copy and paste 5-line chunks from your own personal code collection for those few tasks that jquery can do with 2 lines, if excess typing is a problem... This avoids carrying around unnecessary dead weight, and better orients the programmer to his or her craft... i.e. being a programmer
You could write a method that performs the fading and reuse that, sure. But sometimes this is easier - especially considering you can control the easing in this specific case.
You clearly missed the part in RichW's post talking about browser compatibility. I use JQuery still because I still have to support older IE browsers. document.querySelector() doesn't work there so I have to use JQuery to do the selecting.
Another example is Promises. I can't use ES6 Promises because I have to support older browsers and JQuery provides me with this functionality that works in those older environments.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I have yet to see a non-trivial example of JQuery accomplishing anything with significantly fewer lines than a vanilla js + css + html approach. What I have seen a lot of is the opposite... long and convoluted meandering nonsense.
If "simple dom manipulation" is all you're talking about, well, I still can't fathom why anybody would use it. There are a couple of examples where it requires fewer lines to do is extremely simple things, but it's pretty easy to copy and paste 5-line chunks from your own personal code collection for those few tasks that jquery can do with 2 lines, if excess typing is a problem... This avoids carrying around unnecessary dead weight, and better orients the programmer to his or her craft... i.e. being a programmer
It depends on the situation. For example:
$(el).fadeOut(300);
You could write a method that performs the fading and reuse that, sure. But sometimes this is easier - especially considering you can control the easing in this specific case.
You clearly missed the part in RichW's post talking about browser compatibility. I use JQuery still because I still have to support older IE browsers. document.querySelector() doesn't work there so I have to use JQuery to do the selecting.
Another example is Promises. I can't use ES6 Promises because I have to support older browsers and JQuery provides me with this functionality that works in those older environments.