Open delindell opened 4 years ago
const sock = {
name: 'steve',
age: 23,
brand: 'Hanes',
color: 'White',
status: 'Extra Dirty',
hobby: 'Swimming'
location: 'San Franciso',
size: 'W 5-10'
wantsLeft: true,
height: 'tube',
description: 'bla bla bla bla',
quote: 'Don't hang me out to dry',
daysSingle: 365
}
User Story
As a user, when the page loads I want to see all the socks.
AC
WHEN the page loads THEN I should see all the socks AND they should appear as images AND when I hover over one image should be greyed out and the name should appear
Dev Notes
sock-drawer
, class=d-flex flex-wrap
printToDom
function - that takes in adivid
andtextToPrint
sockBuilder
function - that takes in an array, loops over the array, builds adomString
(image, h2 tages for names (these should be hidden) container div should have a class ofsock-card col-4
), and callsprintToDom
.sock-card
(use getElementByClassName and loop) with function calledshowName
.sock-card
(use getElementByClassName and loop) with funciton calledhideName
showName
function - grey out image (use opacity), show h2 tag with namehideName
function - display regular image, hide h2 tag with name