Starter code for assignment 2 MAD9014 Fall 2020
There are two script files. One has the data and the other file uses that data. Include the data from the provided data.js
file by attaching both javascript files to the HTML page with <script>
tags. (this is already done if you used the starter files). Put the data.js
<script>
first.
Add one more Object
with the same properties to the Array
in the data.js
file. Use your own name for this new person object. You don't have to use your personal phone or email. Put your new object first in the Array
.
Use a function that gets called after the DOMContentLoaded
event which will loop through the Array from the data file and create one card, that looks like the sample one in the HTML, for each person object. This is in the starter code.
The function must remove the sample card before looping through your data to build the new cards.
Use the provided CSS. You can edit the contents of the provided CSS selectors. There is no need to add more selectors.
Create your own colour-scheme and replace any instances of rebeccapurple
or white
with a colour from your colour-scheme. You may edit the CSS beyond this if you like.