Giter Site home page Giter Site logo

objects_project's Introduction

objects_project

Instructions

  1. Do NOT alter the HTML or CSS and do not use an outside library.

  2. Finish setting up the info object in the script.js file

    • Following the format of the first item in the info object, complete the other 3 profiles with 3 other people in your breakout room
    • Remember to create all the same properties as for the first profile, and the same method
  3. Create a variable to reference the div with the id: #content

  4. Create a variable called firstPerson to reference the first tag using the id: #first

    • We will be treating this a tag like we have been using tags
  5. Setup the first onclick event for the #first tag

    • Hint: remember to prevent refresh
    • Inside of this event, create FOUR new elements stored under different variables:
      • Create a
        tag
      • Create 3 different

        tags

    • Set the innerHTML for the first

      tag you created to display person #1's first and last name in a sentence

      • ex: "My name is Francisco Bermúdez"
    • Set the innerHTML for the next

      tag to display a sentence stating the height of the person

    • Set the innerHTML for the final

      tag to display a sentence stating their favorite food, and color

    • Using your knowledge about changing CSS with JS change the following styles for our
      that we made:
      • color: "white"
      • fontSize = "50px"
      • margin = "5% 20% 5% 20%"
      • padding = "30px"
      • border = "solid black 5px"
    • IMPORTANT: we have now created these 4 elements, but we have to add them to our HTML
      • We want to put our 3

        tags inside of our

        , then add our
        to our #content, HOW do we do that???
        • First, using appendChild add our 3

          tags to our

        • Then, add our
          to our #content :)
  6. Now that we have completed one of our profiles, the next step is to repeat steps 4 - 5 for the other 3 people

  7. EXTRA CREDIT: edit your code so that only ONE profile can be displayed at a time!

  8. EXTRA EXTRA CREDIT: Add a to our profiles in addition to the 3

    tags, when the button is pressed it should run the methods that we wrote for all of our profiles

objects_project's People

Contributors

francisco-bk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.