A bit of the back story
So, to make a long story short, I have been a front end developer since... 2014 (so not too long in all reality). I learned from the online platform Team Treehouse and from there, started my freelance career which lasted all of three years and ended due to me becoming quickly burnt out on clients requesting the same tools over and over again for their businesses. So, I took a year long break from creating anything web really and gave myself time to breath again. Really look at development in a new light which made me decide to learn again. Not for business, but for myself. Not with an incredible end goal in mind, but to simply learn a technology that I know would serve me and my crazy ideas in the future, so I again, am learning at Team Treehouse but this time for back end development.
Now, having had an account before, I decided to start fresh and create a new account so I can actually refresh on some concepts I could have missed. And, as I mentioned earlier, that has brought me to question JQuery.
Here is where JQuery won me over the first time. I will admit, there is something enticing about using one selector for everything which, if you don't know is simply typing out:
// JQuery $(".CSSselector");
This again, returns an array. But... Where the real magic of JQuery lies is with how easy it is to add chain methods to your selector.
They made it easier to select an object and manipulate it with many chain methods vs writing out an entire function. So is this such a bad thing? Well, that depends (and please remember that this is purely opinionated and honestly I am writing this more so for myself).
Manipulating selected elements
Ok, so we have our elements selected. Let's pretend we want to change all of the 'color' style properties to be red. Let's compare again:
// JQuery $(".CSSselector").css('color', 'red');
To keep you from getting bored...
So, let's assume most of us using JQuery are using it simply for the ease of DOM manipulation. Those methods alone make up a small portion of what JQuery actually does so this begs the question, is it really worth it to load an entire library to make manipulating the DOM a bit easier? Especially with our modern web going mobile and our need to load files quickly and easily is becoming more necessity than ever before.
As I have said, JQuery has it's place and I am sure many individuals DO know when to use it but, what I want to stress is if you use JQuery with every project, then I would consider actually looking at if the project should require JQuery. It is very easy to become reliant upon JQuery goodness but that does create some very bad habits.
I guess what I want to say is just really assess if you need to use JQuery. I have come to realize that it isn't worth it for a lot of my projects and I find more often than not that it just adds one more layer of complexity to not only the websites I create but websites others create as well. But, this is just one nerds opinion...