P2 TW2 - questão 2

In this example below you will see how to do a P2 TW2 - questão 2 with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by phcacique, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright phcacique ©

Technologies

  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>P2 TW2 - quest√£o 2</title>
  
  
  
  
  
</head>

<body>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<ul id="personagens"></ul>
  
  

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




</body>

</html>

/*Downloaded from https://www.codeseek.co/phcacique/p2-tw2-questandxe3o-2-KymONV */
var lista = ["Harry Potter", 
			 "Rony Weasley",
			 "Hermione Granger",
			 "Albus Dumbledore",
			 "Severus Snape",
			 "Tom Riddle",
			 "Hagrid",
			 "Dolby",
			 "Nevile Longbottom",
			 "Minerva McGonigal"];

window.onload = function(){
	for (var i=0; i<lista.length; i++){
		$('#personagens').append("<li style='color:blue'>"+lista[i]+"</li>");
	}
};

Comments