Skip to content
Binary file added lib/Manny Pic 2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions lib/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>About Me</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" media="screen" href="./styles.css" />
</head>

<body>
<p id="imageReveal"><button onclick="revealImgae()">Reveal Image</button></p>
<ul id="changeFont">
<li id="li1"><span>Nickname:</span> Manny</li>
<li id="li2"><span>Favorties:</span> music, alfredo, coding</li>
<li id="li3"><span>Home:</span> Wilmington </li>
<li id="li4"><span>Random Fact:</span> Red is my favorite color.</li>
</ul>
<p id="imageHide"><button onclick="hideImgae()">Hide Image</button></p>
<script src="./main.js"></script>


</body>

</html>
2 changes: 2 additions & 0 deletions lib/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,7 @@ <h3>David L. Steward</h3>
</div>
</main>
<script src="./script.js"></script>
<script src="./main.js"></script>

</body>
</html>
28 changes: 28 additions & 0 deletions lib/js-dom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Minority Tech</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" media="screen" href="./styles.css" />
</head>
<body>
<div class="container">
<p id="first">We are coders!</p>
<p><button onclick="myFunction()">Click Me To Change Text!</button></p>
<p id="second"></p>
<button id="paraTag" onclick="changeTextColor()">Click Me To Change The Color of the Text!</button>
<button id="changeBack" onclick="changeTextBack()">Click Me To Change The Color of the Text Back to Black!</button>
<button id="bigFont" onclick="sizeOfParaFont()">Click Me To Change Text Size!</button>
<input type="text" id="myTextInput">
<button id="hiddenImage" onclick="hideImage()">Click to hide Image!</button>

</div>

<script src="./new.js"></script>


</body>

</html>
14 changes: 14 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
document.getElementById("changeFont").style.fontFamily = "Arial, sans-serif";
document.getElementById("changeFont").style.color = "red";


function revealImgae() {
var x = document.createElement("IMG");
x.setAttribute("src", "Manny Pic 2.jpeg");
x.setAttribute("width", "400");
x.setAttribute("height", "350");
x.setAttribute("alt", "Manny Playing Basketball");
document.body.appendChild(x);
}


69 changes: 69 additions & 0 deletions lib/new.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

var first = document.getElementById("first");
var second = document.getElementById("second");
var myTextInput = document.getElementById("myTextInput");
var bigFont = document.getElementById("bigFont");


function myFunction() {
var first = document.getElementById("first");
if (first.innerHTML === "We are coders!") {
first.innerHTML = "Developers for life!";
} else {
first.innerHTML = "We are coders!";
}
}
var url = 'https://avatarfiles.alphacoders.com/822/82242.png';

var image = new Image();
image.src = url;
document.getElementById("second").appendChild(image);


function changeTextColor() {
var paraTag = document.getElementById("paraTag");
if (first.innerHTML === "We are coders!") {
paraTag.style.color = "red";
first.style.color = "red"
} else if (first.innerHTML = "Developers for life!") {
paraTag.style.color = "red";
first.style.color = "red"
} else {
first.style.color = "black";
}
}

function changeTextBack() {
var changeBack = document.getElementById("changeBack");
if (first.style.color = "red") {
paraTag.style.color = "black";
first.style.color = "black"
} else {
paraTag.style.color = "red";
first.style.color = "red"
}
}

function sizeOfParaFont() {
var first = document.getElementById("first");
var bigFont = document.getElementById("bigFont");
var congrats = alert(`Click "OK" to confirm the change in Text Size!`);
if (bigFont.innerHTML === "Click Me To Change Text Size!") {
first.style.font = "italic bold 40px arial,serif";
} else if (first.innerHTML === "We are coders!") {
congrats();
} else {
alert("Click the button to change the font!");
}

}

function hideImage() {
var hiddenImage = document.getElementById("hiddenImage");
if (hiddenImage.innerHTML === "Click to hide Image!") {
image.style.display = "none";
} else {
image.style.display = "block";
}

}
32 changes: 32 additions & 0 deletions lib/toc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Table of Contents</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" media="screen" href="./styles.css" />
</head>
<body>
<div >
<h3 >Table of Contents</h3>
</div>
<hr/>
<div id="ToC">
<h1>Fruits</h1>
<h2>Red Fruits</h2>
<h3>Apple</h3>
<h3>Raspberry</h3>
<h2>Orange Fruits</h2>
<h3>Orange</h3>
<h3>Tangerine</h3>
<h1>Vegetables</h1>
<h2>Vegetables Which Are Actually Fruits</h2>
<h3>Tomato</h3>
<h3>Eggplant</h3>
</div>

<script src="./main.js"></script>

</body>
</html>