Skip to content

rjgtech26/exploring-dom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<<<<<<< HEAD

JS Data Assignment

Assignment Goals:

  • gain a deeper appreciation for how JavaScript variables are created scoped
  • create a JSON Data to represent an object
  • build a objects from JSON data
  • use DOM methods to add HTML to display the object

GitHub Repository

https://github.com/htc-ccis2591/js-data/

You’ll want to begin each assignment by forking the repository and cloning it locally. When you are done, you’ll push to GitHub and submit a pull request.

Moonflower Feature

A new section was added to the HTML to feature an item from the menu.

Put the Data into JSON

Use the information below to write JSON to hold the featured items for the week. Each featured item has a name, image, and description. There are two featured items this week, but there may be more later, so they should be in an array.

Item 1:

  • name: "Hazelnut Cappuccino",
  • image: "images/cappuccino.jpg",
  • description: "A warm, soothing cappuccino with a touch of hazelnut to warm you as the weather turns."

Item 2:

  • name: "Chocolate Cake",
  • image: "images/choc-cake.jpg",
  • description: "Our chocolate cake is rich, moist, and dark. More chocolate to love."

Use the Data to Show the Features

Use your JSON data to build and add HTML to show the two featured items in the “featured-items” div. Create and add the HTML to the page using JavaScript. The code that you write should be able to add any number of featured items to the page.

DOM Access Assignment

Completing this assignment depends on knowing:

  • basic JavaScript to create variables, work with arrays, if/else statements and for loops (Ch 3)
  • methods for selecting and navigating the DOM Tree, adding and removing attributes, creating a new element and appending it to the DOM (Ch 4)

GitHub Repository

https://github.com/htc-ccis2591/exploring-dom

You’ll want to begin each assignment by forking the repository and cloning it locally. When you are done, you’ll push to GitHub and submit a pull request.

Moonflower’s Coffee Shop

Open the web page in a browser. View the elements in the Developer tools. It makes looking at the relationships between elements easier.

Assignment

Fill in the code requested in the JavaScript file.

8c166d874739eec8d8d2f0ed51959e0a7f64f070

About

Exploring DOM Assignment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 58.9%
  • JavaScript 34.6%
  • CSS 6.5%