Code Monkey home page Code Monkey logo

domosaur's Introduction

DOMosaur

Introduction

We'll be writing code that will turn this page with no JavaScript into this page with lots of interactivity.

Guidelines

  • You will be working with JavaScript ONLY for this project. You can refer to the CSS and HTML files, but you will do all of your work in main.js.

And Now, Some Warmup Challenges

No need for event listeners for this one. Just flex those querySelectors muscles!

  1. Change the span with the class mess-with-me to have a font size of 40px.

  2. Change the paragraph with the class mess-with-me to have a background color of green.

  3. Hide the second dinosaur's image so that it's no longer visible, and so that the area below it moves up to take the space. If you're not sure of how to do this, look up the CSS rule for that!

  4. Change the first dinosaur image so that the image's dimensions are 324 pixels wide.

Event Listener Challenges

  1. Add an event listener to the span with the class mess-with-me so that when it is clicked, the font color changes to orange.

  2. Add an event listener to the first dinosaur so that when they are clicked, they receive a red border.

  3. Add an event listener to the feathered dinosaur, so that when they are clicked, they become 50% transparent.

  4. Add an event listener to the "Switch Background Color" button so that when it is clicked, we switch the background color of the row of dinosaurs to a color of your choice.

  5. Add an event listener to the dinosaur with the id biggify that, when HOVERED, grows the image to 200 pixels wide. Note that this is a different event, and you'll likely need to do some research on what different string you'll need to pass. It's not gonna be click!

Stretch Goals

  1. Make it so that when you click the "Switch Background Color" button, you switch it back and forth from white to whatever color you chose. This doesn't require another event listener, but, rather, a rewrite of the function you made into your event listener. Hint: when you haven't explicitly set the background color through JavaScript yet, its value will always be an empty string, no matter what you've set it to in other sources (like the browser's default white background, or through your own CSS file).

  2. Add a new event listener so that when the biggify dinosaur is no longer hovered, they change back to their original size. Hint: same as the above one, but for its width! Hint 2: You'll have to use a different kind of event than you did before, but... it's a related event with a similar name.

domosaur's People

Contributors

alexcrist avatar abbreviatedman avatar helboi559 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.