I have a button "Add to friends". After you press this button, you need to make it disappear. How to do it?

Tell me, please, how can I remove the button.

Closed due to the fact that the essence of the question is not clear to the participants Alex , LEQADA , Qwertiy ♦ , insolor , Streletz 19 Nov '15 at 0:35 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    element.remove() for example for this site, remove the share / vkontakte button after clicking:

     element=document.getElementsByClassName('share')[0].children[0] element.addEventListener('click',function() {this.remove()});