You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: projects/build-a-randomizer-generator-with-html-css-js/build-a-randomizer-generator-with-html-css-js.mdx
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,16 @@ CluelessGenerator/
71
71
72
72
HTML buttons allow users to interact with the outfit generator. These buttons control the behavior of the app, such as randomizing outfits and cycling through different images of accessories, tops, and bottoms. Here’s what each part does:
73
73
74
+
### Main Container
75
+
76
+
Below the header, add a div that wraps everything:
These buttons let the user cycle through different outfit pieces within each category (add-ons, tops, bottoms). For example, the `0prevBtn` and `0nextBtn` control the add-ons (accessories) images:
96
+
Next, add three sections (Add Ons, Tops, and Bottoms), each with an image, and two arrow buttons below them (previous and next).
87
97
98
+
First, create the container section for Add Ons (hats and glasses):
Similarly, each outfit category has its own set of arrows to go backward or forward through the images.
109
+
Then, follow the same format to create the Tops section and the Bottoms section. Make sure to change the `img id`, `class`, and `alt` descriptions, as well as the values of `button id`.
110
+
111
+
Each section has an empty image to be filled by JavaScript, uses unique IDs to match with your script later, and contains two buttons for cycling through images of the outfit pieces within each category.
0 commit comments