-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Dog Photos and List to DOM #14
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work.
|
||
|
||
grabImages() | ||
grabBreeds() | ||
|
||
|
||
breedDropDown.onchange = () => { | ||
const filteredDogsList = Object.keys(dogsList).filter(dog => dog.startsWith(breedDropDown.value)) | ||
dogBreedList.innerHTML = '' | ||
filteredDogsList.forEach(breed => { | ||
const createListItem = document.createElement('li') | ||
createListItem.id = `${breed}` | ||
dogBreedList.appendChild(createListItem).textContent = breed | ||
addBreedClickListener(breed)}) | ||
} | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grabImages() | |
grabBreeds() | |
breedDropDown.onchange = () => { | |
const filteredDogsList = Object.keys(dogsList).filter(dog => dog.startsWith(breedDropDown.value)) | |
dogBreedList.innerHTML = '' | |
filteredDogsList.forEach(breed => { | |
const createListItem = document.createElement('li') | |
createListItem.id = `${breed}` | |
dogBreedList.appendChild(createListItem).textContent = breed | |
addBreedClickListener(breed)}) | |
} | |
grabImages() | |
grabBreeds() | |
breedDropDown.onchange = () => { | |
const filteredDogsList = Object.keys(dogsList).filter(dog => dog.startsWith(breedDropDown.value)) | |
dogBreedList.innerHTML = '' | |
filteredDogsList.forEach(breed => { | |
const createListItem = document.createElement('li') | |
createListItem.id = `${breed}` | |
dogBreedList.appendChild(createListItem).textContent = breed | |
addBreedClickListener(breed)}) | |
} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You kill me with all the extra spaces!
Fetched data from API and added to DOM. Included color changing on click listener for dogs list and search option by first letter.