[ Prev ]
2022-11-14

-- Nov 9 In-Class Exercise Thread
<!DOCTYPE html> <html lang="en"> <head>
    <meta charset="UTF-8">
    <title>Stroop</title>
</head> <body>
    <div id="text" style="color:rgb(255, 0, 0); size: 32px; padding-top: 1.5in;">Green!</div>
    
<script>
    var text = document.getElementById('text')
    text.onclick = function() {
        this.style.color = 'green';
        this.style.paddingTop = '0.75in';
        setTimeout(function() {
            text.style.color = 'red';
            text.style.paddingTop = '1.5in';
        }, 5000);
    }
    
</script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Stroop</title> </head> <body> <div id="text" style="color:rgb(255, 0, 0); size: 32px; padding-top: 1.5in;">Green!</div> <script> var text = document.getElementById('text') text.onclick = function() { this.style.color = 'green'; this.style.paddingTop = '0.75in'; setTimeout(function() { text.style.color = 'red'; text.style.paddingTop = '1.5in'; }, 5000); } </script> </body> </html>

-- Nov 9 In-Class Exercise Thread
<!DOCTYPE html> <html lang="en"> <head>
    <title>Stroop</title>
</head> <body>
    <div id="test" style="font-size: 32pt; color: red; top: 1in">Green!</div>
    <script>
        function testDiv() {
            test = document.getElementById("test");
            test.style.color = "green";
            test.style.top = ".25in"
            setTimeout(() => {
                test.style.color = "red";
                test.style.top = "1in"
            }, 5000)
        }
    </script>
</body> </html>
<!DOCTYPE html> <html lang="en"> <head> <title>Stroop</title> </head> <body> <div id="test" style="font-size: 32pt; color: red; top: 1in">Green!</div> <script> function testDiv() { test = document.getElementById("test"); test.style.color = "green"; test.style.top = ".25in" setTimeout(() => { test.style.color = "red"; test.style.top = "1in" }, 5000) } </script> </body> </html>
2022-11-16

-- Nov 9 In-Class Exercise Thread
<!DOCTYPE html> <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Stroop</title>
    </head>
    <body>
        <div id="text" onclick="changeText()" style="font-size:32pt;color:red;position:absolute;top:2in;">Green!</div>
    </body>
    <script type="text/javascript">
        function changeText() {
            textData = document.getElementById('text')
            textData.style.color = 'green'
            textData.style.top = '.25in'
            setTimeout(() => {
                textData.style.color = "red"
                textData.style.top = "2in"
            }, 5000)
        }
    </script>
</html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Stroop</title> </head> <body> <div id="text" onclick="changeText()" style="font-size:32pt;color:red;position:absolute;top:2in;">Green!</div> </body> <script type="text/javascript"> function changeText() { textData = document.getElementById('text') textData.style.color = 'green' textData.style.top = '.25in' setTimeout(() => { textData.style.color = "red" textData.style.top = "2in" }, 5000) } </script> </html>

-- Nov 9 In-Class Exercise Thread
<!DOCTYPE html> <html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Stroop</title>
  </head>
  <body>
    <script>
      const handleClick = () => {
        green = document.getElementById("green-text");
        green.style.top = "0in";
        green.style.color = "green";
        setTimeout(() => {
          green.style.top = "0.75in";
          green.style.color = "red";
        }, 5000);
      };
    </script>
    <div
      id="green-text"
      style="color: red; position: absolute; font-size: 32pt; top: 0.75in"
      onclick="handleClick()"
    >
      <p>Green!</p>
    </div>
  </body>
</html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Stroop</title> </head> <body> <script> const handleClick = () => { green = document.getElementById("green-text"); green.style.top = "0in"; green.style.color = "green"; setTimeout(() => { green.style.top = "0.75in"; green.style.color = "red"; }, 5000); }; </script> <div id="green-text" style="color: red; position: absolute; font-size: 32pt; top: 0.75in" onclick="handleClick()" > <p>Green!</p> </div> </body> </html>

-- Nov 9 In-Class Exercise Thread
<!Doctype html>
 <html>
	<head>
		<title>Stroop</title>
	</head>
	<body>
		<div id="green" style="position: absolute; top: 2in; color:red; 
                 font-size:32pt;" onclick="goGreen()">
			<p>ooga booga chooga!</p>
		</div>
		<script>
			function goGreen(){
				chng = document.getElementById("green");
                                chng.style.top = "1in";
				chng.style.color = "green";
				setTimeout(() => {
                                chng.style.top = "5in";
			        chng.style.color = "red";
				}, 5000)
			}
		</script>
	</body>
 </html>
<!Doctype html> <html> <head> <title>Stroop</title> </head> <body> <div id="green" style="position: absolute; top: 2in; color:red; font-size:32pt;" onclick="goGreen()"> <p>ooga booga chooga!</p> </div> <script> function goGreen(){ chng = document.getElementById("green"); chng.style.top = "1in"; chng.style.color = "green"; setTimeout(() => { chng.style.top = "5in"; chng.style.color = "red"; }, 5000) } </script> </body> </html>
X