This is killing me

First of all, I would like to thank anybody in advance for taking the to help out.

Now, is there a coder out there using Atom with a Mac? If so, have you added Jquery to an HTML doc? HOW THE F did you do it??? There is nothing on youtube or other sites, I have been trying to. Codecademy and Freecodecamp train you well with Jquery but they dont teach you how to link it to an html doc to animate HTML elements! Please help.

You add the <script></script> in the head section
https://www.w3schools.com/jquery/jquery_get_started.asp

I don’t use a Mac, but pretty sure I don’t need to in order to answer your question. :wink:

Google “jquery cdn” to find a link that you can embed into a SCRIPT tag in your HTML. If you use CDNJS, they make it extra easy for you by providing the “Copy Script Tag with SRI” functionality. And use “jquery.min.js” when deploying final code to the Internet. You should use “jquery.js” only on your local machine when doing development.

Also don’t put SCRIPTs in the HEAD unless you have a really good reason to. A better place for them is the end of the BODY.

Looking at the wording of your post you seem a bit frustrated. The users in this thread have provided suggestions for getting started. I recommend taking a break and coming back to this after you’ve calmed down.

1 Like

Yeah, just relax. I guarantee this is not the last time you’re going to be confused by something and beat your head against the desk trying to figure something out. I do it at least twice a day. It’s just part of coding and it gets amplified if you are self teaching.

To answer your questions, there are basically two ways to do it: remotely or locally.

Remotely, you would just google “jquery cdn” and get the remote address for it. Then you add it with a script tag.

<!DOCTYPE html>
<html>
  <head>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <!-- other head stuff -->
  </head>
  <body>
    <!-- the body of your code -->
  </body>
</html>

The other option is to do it locally. You download it and usually put it in some folder, like say “js”. Then you link to that local file.

<!DOCTYPE html>
<html>
  <head>
    <script src="js/jquery.min.js"></script>
    <!-- other head stuff -->
  </head>
  <body>
    <!-- the body of your code -->
  </body>
</html>

I guess I am confused by your statement, “There is nothing on youtube or other sites” I found several videos dedicated specifically to that subject. Similarly, a google search revealed many answers. Perhaps you were using the wrong search terms. I often have to try a few different combinations.

I know it can be frustrating. But researching things is part of the job. You will never know everything (especially since it keeps growing) so being able to find things is part of the job. Learn to enjoy the hunt. :wink: