Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!doctype html>
<html>
<head>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
Expand Down Expand Up @@ -52,7 +51,8 @@ <h3>
Click me to get free stuff!!!!
</a>
</div>

<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="script.js"></script>
</body>

</html>
25 changes: 25 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Change the <h1> to something cheeky
let h1 = $("h1");
h1.text("Lasagna");
// Inside the container for "Upcoming Traversals", create and insert an ordered list of upcoming traversals.
let traversals = $(".info-box");
let ol = $("<ol></ol>");
traversals.append(ol);
ol.append("<li>What is a traversals list even?</li>");
ol.append("<li>I was instructed to add some items</li>");
ol.append("<li>Here's another one</li>");
// Make all sad classes into happy ones.
let sad = $(".sad");
sad.addClass("happy");
sad.removeClass("sad");
// Make the annoying popup link point instead to http://www.cashcats.biz.
let annoying = $("#annoying-popup a");
annoying.attr("href", "http://www.cashcats.biz");
// Replace the ellipsis ... in one of the suggested topics with the content of your choice -- but do so by traversing from a different element.
let suggested = $(".suggested-topics ul li");
let ellipsis = suggested.last().prev();
ellipsis.text("Something");
// Replace the form input with a <textarea> instead of a <input type="text">.
let input_list = $("input");
let text_input = input_list.first();
text_input.attr("type", "textarea");
3 changes: 2 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ form{
background-color: red;
color: white;
position: absolute;
top: 10px;
top: 40px;
right: 0px;
height: 100px;
}
/* What, you like awful '90's blink tags?
Expand Down