I have button and I need to call it and take (show) an id (number) and after hide it.
I have got this line :
<div id="follow_21" class="button rounded" title="">Follow</div>
I do not know how to call (onclick) or other way this button and take only 21 and show it in alert(”);
I tried onclick="follow():
<div onclick="follow(21)" class="button rounded" title="">Follow</div>
and function :
function follow(event){
alert(event);
}
alert works good but I don’t know how to hide() element by clicking on it.
Suppose you will help me.
Using jQuery’s hide function: