Getting started with jquery - tribute page project

Getting started with jquery - tribute page project
0

#1

I’m starting to work on my tribute page. I’m trying to manipulate classes using jquery, but there are no changes. I’ve tried to see some other examples, but I’m still stuck.

For example here is my code, written in the java script section of the codepen interface:

$(document).ready(function(){
 $(".text-primary").addClass("color", "red")
$(".text-primary").addClass("animated fadeOut")
  });

Here is my html code:

<h1 class = "text-primary">Hello World!</h1>

What’s going wrong?


#2

I’ve edited your post for readability. When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Are you seeing any errors in the browser console (Ctrl+Shft+J in Chrome)?

Did you add JQuery library to your JS External Scripts/Pens section of Codepen?

Did you add the animate.css external library to your CSS external Stylesheets/Pens section of Codepen?

If you have a Codepen, paste the link into your original post, so we can take a look at all of your settings.


#3

Hi,
Thanks. I added the animate.css library and things work now!