jQuery links for localhost

I started learning about jQuery on my 3rd challenge, the issue that I’m experiencing is that I’m also writing code on my laptop as localhost but for some reason I can’t replicate the same result. I went to jQuery site and copied the links but still not able to see the result provided in FCC.

Can someone assist me with this? or direct me where to go?

Thank you much!

Are you trying to reproduce the animation by adding certain classes to an element, like this?

$(".targetElement").addClass("animated shake")

Do you mean you need the jquery CDN link to include in the header? If so it’s:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>

Yes, for some odd reason, it doesn’t do it… I’m using mozilla firefox, do i need a plug-in?

Oh yes, this is what I have

Is that the only link I need?

No you do not need a plugin.

Are you including it in the <head> section of your code? It’s the only code that’s needed to use jQuery on your page.

Yes, the link is between the <head> element

This is what I have

Could you paste a link to your source code? Either a Codepen link or Github Gist? Or put your code in `s so it doesn’t get filtered out. Thanks.

You need to include animate.css

If you’d rather use a cdn

I didn’t realize he was using animation functions, though I think those same classes are available in bootstrap, though I may be wrong.


I hope I did right!? jeje

I’ll try that… thanks

The repository you provided was empty, I’m unable to check your source code.

if you click on wiki… code for localhost

not functions, he’s using animation classes that are provided by animate.css (and abstracted away from the user in the jQuery section of FCC). there’s no relation between animate.css and bootstrap.

Oh, alright, well include the following in the head:
<link href="https://cdnjs.com/libraries/animate.css/" rel='stylesheet' type='text/css'>
After you should be good :slight_smile:

So do I need to add the link animate.css as well… hmmm

You did not correctly link it.

<link href="https://cdnjs.com/libraries/animate.css/" rel='stylesheet' type='text/css'>

Should be:
<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css" rel='stylesheet' type='text/css'>

You were linking to a page about the library, rather than the library itself which is part of the problem.

Make that change and let us know if it solved your problem :slight_smile:

Ah ok… got it; thanks a lot @anon52159105 it worked… ye!

1 Like