Correct me if i'm wrong, in Step 6 you write this,
// Get the original element for this image
const imageElement = document.querySelectorAll(`img[data-src='${imageData.imageURL}']`)
but the images never showing. instead i have the error message inside console setAttribute() is not a function ... after change into this one, the errors gone and images showing. :)
// the problem is located at "querySelector()"
const imageElement = document.querySelector(`img[data-src='${imageData.imageURL}']`)
If you have a time please update the sample code, for future reader,
Again thank you for the article.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Trez, thank you for the article..
Correct me if i'm wrong, in Step 6 you write this,
but the images never showing. instead i have the error message inside console
setAttribute() is not a function ...
after change into this one, the errors gone and images showing. :)If you have a time please update the sample code, for future reader,
Again thank you for the article.