Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Lsimmons98
Copy link

Fetched data from API and added to DOM. Included color changing on click listener for dogs list and search option by first letter.

Copy link

@stephenmckeon stephenmckeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work.

Comment on lines +41 to +58


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)})
}



Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)})
}

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants