Deleted the class of the div block when I clicked on him, what's wrong?

Hello! the bottom line: there is a button and a div-block1(.defects-forms) which lie in div-блоке2 (.add-defects-button). On button click add a class div-блоку1 (.defects-forms-show)... when you click out .add-defects-button class .defects-forms-show at diva .defects-forms removed.... and he also udaseda when I click on the div itself .defects-forms that lies inside .add-defects-button, and the money had... for example, click one of the buttons and click on the block with nadpisyu Title... the block will disappear and not have to... it should hide only when clicking on another button or on empty space.... how to fix? thank you)
June 14th 19 at 20:25
1 answer
June 14th 19 at 20:27
Type such?
well, sort of Yes! thank you) - Connie_Herman commented on June 14th 19 at 20:30

Find more questions by tags JavaScriptjQuery