Nicht 15 Newbie Poster

Ok i solved it now i didnt wrote the script part at the bottom of the html. it couldnt find a button because it didnt existed yet

cereal commented: Great :) +15
Nicht 15 Newbie Poster

It's the exact same thing as yours i copied it into the js file and it didnt work but in a new file it does and there arent any errors

Nicht 15 Newbie Poster

Uncaught TypeError: Cannot read property 'addEventListener' of null
When I make a new file and add everything from jsfiddle it work perfectly

Nicht 15 Newbie Poster

Thank you very much
I just tried it out but it doesnt seem to work somehow i copied everything youve written but its not even starting the function for me :(

Nicht 15 Newbie Poster

I'm fairly new to programming so this question might be dumb.
So what I'm trying to do is to create a new div with other divs and images inside it when I press a button.
I've tried many things from other websites but they didn't quite do what i wanted.

This is what I'm trying to add when pressing a button:

<div class="item rarity1">
    <img src="example.png"/>
    <div class="value">$87.03</div>
   <div class="subtext">Test</div>
</div>