Giter Club home page Giter Club logo

buttonjs's Introduction

Button JS

The goal of this project is to complete scripts which enable all of the desired features of the buttons on the HTML webpage; there are 5 challenges in total. Here is the general strategy you should use to approach each problem:

  • Examine the project in the browser. Get a feel for the space before concerning yourself with the code.
  • Examine the CSS file and see what classes and ids already exist. Hint: you may want to add your own in the future to solve a challenge.
  • Add a function to each buttons "onclick" attribute. You are responsible for naming the function.
  • Scroll to the bottom of the HTML page, name your 5 functions first with proper syntax and attack each one at a time.
  • Don't forget to save code in atom before running in the browser and make sure to refresh the page before trying to click the button you are working on.

Notes

Consult the notes we took last week for tips on vocabulary and proper syntax.

Challenge 1

When you click this button the color of the h3 heading and the p-tag should change to white. Also to help with the contract of the picture you should change the background color to black. You will want to perform at least 3 separate queries to complete the overall task. Consider adding some utility classes to the css file to help.

Challenge 2

Take it to the next level of user experience; create another class which houses the old default settings and toggle a "daymode" and "nightmode" mode to switch between color settings.

Challenge 3

This challenge represents an internal family Gaussian Diagram...not a Venn Diagram.

  • gp stands for grand parent (rgb: #550000)
  • p stands for parent (rbg: #991100)
  • c stands for child (rgb: #dd1111)

To show that the genes get passed on down through the generations we will change the background color from a dark red to lighter shades of red. Use three different query selectors to alter the diagram. Again, you may find adding some classes to the css file helpful.

Challenge 4

Dr. Suess would like his list of character to be appropriately colored. Out of the list select the red fish and the blue fish and change their text colors to be congruent with their names. You will want to use a query selector to grab the characters. At this point you should have an array of answers, more than you need in fact. Use your knowledge of array notation to change the css of only two fish we care about.

  • let firstfish = array[0];
  • let somefish = array[some number];

Challenge 5

Just like the Fake Twitter examples where I added 1 to the like count, activate these two buttons to add to the span element with an initial value of 20 in this challenge.

buttonjs's People

Contributors

shamrockprogramming avatar

Watchers

James Cloos avatar  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.