-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I want to thank you for your book. Even though I am not a "kid", I think your book is the best/easy to understand for newbies.
I am having trouble getting the code to work the way I want. The instructions say to make each name fade in... one at a time as I understand it. However, the last item in my array fadeIn first, and then the first two items fadeIn at the same time. I'd appreciate any guidance you could offer on this.
Here is my code:
<title>Playing with the DOM</title><h1>Hello World!</h1>
<script src="https://code.jquery.com/jquery-2.1.0.js"></script>
<script>
var friends = ["Katie", "Josh", "Jason"];
for (var i = 0; i < friends.length; i++) {
$("body").append("<p id=friend>" + friends[i] + "</p>");
//The line below is where I fadeIn the names.
$("p").hide().fadeIn(750);
}
$("h1").text("My Friends:");
$("p").append(" smells");
</script>
Metadata
Metadata
Assignees
Labels
No labels