dev2 – Six Degrees of Separation New CSS

At this point the game.js has pulled out any of the DOM construction and manipulation from the two core classes of Actor and Credit. Each has their respective methods getCredits() and getCast(). There is also the original getActor() function to search for an actor by string value and return an Actor constructed in a promise value.

We can now rebuild the DOM constructors and manipulators using our functions and our new HTML/CSS. This is going to require re-writing a number of element selectors and functions to clear and build the DOM. So for this week you get to use my rebuilt HTML/CSS and the game.js files which has all the above classes and functions.

There are two empty element selectors and five empty functions. Build these selectors and use them to build the five DOM builders/manipulators. If you run into issues, no worries about having to solve the problem with changes. We’ll review together and change the future base code where needed.

Below are the selectors and functions:

  • const headerCardBox
  • const mainCardBoxCreditsCast
  • function clearCards(cardbox) {}
  • function buildCard(cardType, id, img, main, detail) {}
  • function setHeader(card, id, img, main) {}
  • function setCards(arr, cardbox) {}
  • function init() { //call functions to get an actor clear, build, and set cards }

Leave a comment

Your email address will not be published. Required fields are marked *

css.php