Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 677 Bytes

02-using-css.md

File metadata and controls

22 lines (14 loc) · 677 Bytes

Exercise 2: Using CSS

A new requirement comes in! Employees have been asking for extra customizations, they want to be able to specify:

  • the size of the bike, and
  • the type of rear shocks of a mountain bike.

This is a relatively simple requirement, but you can already see having to add JS code in a couple of different places. It is easy to forget something, especially when there 10 options instead of 2 in this example.

Exercise

Implement requirement and decrease the number of lines of JavaScript.

You can do this by creating CSS classes that specify which fields are visible for each type of bike.

Good luck!

Continue to answer.