Questions about the usage of JQuery

Questions about the usage of JQuery
0

#1

I just finished the JQuery section, and I have a couple questions about it, both of which I feel a little silly asking (because to everyone else here they are probably really obvious answers), but I’m curious and this is the best place to find out.

  1. Why would you actually need to use JQuery?
    From what the lessons showed, it’s just a way of editing HTML elements and their CSS without actually editing the code. Why wouldn’t you just scroll down and edit the code? It seems a lot simpler.

  2. Will I learn about using libraries later?
    It talked about how the Animate.css and JQuery libraries were already included in the background. That’s great for the purposes of learning the basics of JQuery, but not so wonderful if I later want to go use some of the classes in those libraries, but don’t actually know how to access them, or include them in my code, or whatever I need to do to be able to make buttons bounce. As you can tell, my knowledge of libraries is very limited. This leads back to my question. Will libraries come up later with a more in-depth and informative explanation, or is that something I should figure out on my own?

I was also kind of wondering if JQuery will come up again. The section showed the basics, but I still feel like I hardly know anything about it, including when or why to use it. Looking at the “map,” I didn’t see another later section on JQuery, but I didn’t know if it would come up as a subtopic in a different section. If not, should I make an effort to learn more elsewhere, or is the information given in the relatively brief overview all that is needed for web development and design, assuming a thorough knowledge of all other necessary programming languages?

I’ll appreciate any replies. Thanks!


#2

Hey,

  1. Editing HTML/CSS via JS/jQuery is usefull, because you can do in based on variables/events. So for example you can output the content of form when submitted, or change the background every x seconds. Of course there are many more reasons.

  2. You will not really learn how to use libraries (front end section). So if a library is mentioned (that seems interesting) you will have to look for yourself at the documentation to see how it works.

Your last question: jQuery doesn’t come back. Of course you will use it in your projects, so you will learn more of it by using it. Also, I would recommend you search for more tutorials/info about it.


#3

Checkout Learncode.Academy’s jQuery playlist for more info on jQuery. It gets into some pretty advanced features, so do not worry about getting lost, but it’ll give you an idea of what to expect from jQuery and front end development in general.

In fact, you ought to subscribe to his channel. Everyone should. He’s a nice guy and a great teacher.


#4

Thanks! I’m really new to coding, and I’m glad to know you experienced people are willing to take the time to give such good advice to a newbie… I’ve never asked a question on any sort of forum, and to be honest, I was a little worried about it.

Also thanks to PortableStick. Your answer came in as I was writing this, and I’m really glad for it – that link you shared seems to be a great resource; I’m sure I’ll use it lots in the future!


#5

One thing to keep in mind about jQuery is that it’s quite old as JS toolkits go, and has a “kitchen-sink” approach in including unrelated functionality like selectors and AJAX in a single library. Modern toolkits tend to focus on a single thing, and emphasize interoperability by way of common API standards, such as Promises. On that matter specifically, jQuery has a broken and unfixable (for compatibility reasons) Promises implementation, which causes further problems with interop.

I’m not saying jQuery is bad, and it is still worth learning for those times when you want to do low-level banging on the DOM, but I wouldn’t get too hung up on learning all the nooks and crannies. jQuery is going to be that roll of duct tape in your toolbox, not the power tools.


#6

jQuery handle things like this
In IE u add listener for etc click like:
.attachEvent
And other:
.addEventListener

And in jQuery just
element.click(function...

Link: https://msdn.microsoft.com/en-us/magazine/ff728624.aspx


Javascript/jquery functionality support