4 Answers
+ 4
You can only get the element by id once the DOM is fully loaded. Put the part inside of the onload function.
30th Jun 2023, 6:19 PM
Lisa
Lisa - avatar
+ 2
ć±± Zed Please send the code not images of it.
30th Jun 2023, 6:18 PM
Junior
Junior - avatar
+ 2
As already mentioned: Put let btn = document.getElementById("favorite-button-littleone-berryassort") inside the onload function.
1st Jul 2023, 7:26 AM
Lisa
Lisa - avatar
1st Jul 2023, 6:35 AM
ć±± Zed
ć±± Zed - avatar