Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
clr14003 committed Feb 26, 2020
1 parent dcdd361 commit 1e804b6
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 0 deletions.
28 changes: 28 additions & 0 deletions week-3/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!doctype html>

<html lang="en">
<head>
<meta charset="utf-8">

<title>Shopping List</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">

<!-- <link rel="stylesheet" href="css/styles.css?v=1.0"> -->

</head>

<body>

<input type="text" id="itemEntry" placeholder="Enter Item">
<!-- Enter the list items here -->

<button onclick="addItem()">Add to List</button>

<ul id="myList">
<li>Get the list working</li>
</ul>

<script src="js/scripts.js"></script>
</body>
</html>
15 changes: 15 additions & 0 deletions week-3/js/scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

function addItem() {
if (document.getElementById("itemEntry").value != '') {
var node = document.createElement("LI");
node.id = 'giveCheckBox';
var liText = document.getElementById("itemEntry").value;
var textnode = document.createTextNode(liText);
node.appendChild(textnode);
document.getElementById("myList").appendChild(node);
var cbNode = document.createElement("INPUT");
cbNode.setAttribute("type", "checkbox");
document.getElementById("itemEntry").value = '';
}

}
Empty file added week-4/css/style.css
Empty file.
22 changes: 22 additions & 0 deletions week-4/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!doctype html>

<html lang="en">
<head>
<meta charset="utf-8">

<title>Color Picker</title>

<link rel="stylesheet" href="css/style.css?v=1.0">

</head>

<body>
<script src="js/script.js"></script>
<div>
<input type="color" id="bgColorPicker" value="#FFFFFF">
<label id="instructions " for="background">Choose the Background Color and Click the Button!</label>
<input type="Button" name="bgColorChanger" onclick="changeColor()" value="Click Me!">
</div>

</body>
</html>
6 changes: 6 additions & 0 deletions week-4/js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var bgColor;

function changeColor() {
let bgColor = document.getElementById('bgColorPicker').value;
document.body.style.backgroundColor = bgColor;
}

0 comments on commit 1e804b6

Please sign in to comment.