J
J
Jaro2016-02-12 18:42:58
JavaScript
Jaro, 2016-02-12 18:42:58

JS DOM. Triggering of events. How to make the picture disappear when clicked?

there is a div#id='images' in the non-image .
I want it to disappear when I click on the image.

var images = document.querySelectorAll('#images img ');
images.addEventListener('click' function () {
  images.parentNode.removeChild(images.parentNode.firstChild);
})

something like this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jaro, 2016-02-12
@Ideologist

https://jsfiddle.net/spyJaro/Ltof7ck7/ even doesn't work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question