Like the appearance of the element with a class to monitor the class and modify the properties of another block (class)?

The situation is this:
when you click on the "submit" button is presented a new element on the page with the class .first. I want at this event (when the element) remove an adjacent div that has a class .second (using the task, it display:none). I can suggest a script to solve?

Yet to figure out how to remove the clicking https://jsfiddle.net/rmkk/3v6rm99h/2/ but I want it to intercept the element without clicking on anything
July 2nd 19 at 18:10
3 answers
July 2nd 19 at 18:12
.first ~ .second {
 display: none;
}
Sorry, I don't understand. Ie does not use js? just ~ first time I see - kyleigh.Schill commented on July 2nd 19 at 18:15
: Yes, that can be solved by styles, should be resolved styles
~ the selector to the Sisterhood, that is .first ~ .second means rule .second which is the same parent that .first - geovanni_Hegmann commented on July 2nd 19 at 18:18
Yeah, just a clarification: .second is just after .first
In fact it is not just a Sorority, and madreselva :) - Grace_Dickinson commented on July 2nd 19 at 18:21
July 2nd 19 at 18:14
https://developer.mozilla.org/ru/docs/Web/API/Muta...
here is what you need.
Hang the body and catch the appearance of/change one you'll need.
Around and running Angular and similar to him.
July 2nd 19 at 18:16
and what prevents to remove .second when clicking on the "send"button?

Find more questions by tags JavaScript