2
I have a set of buttons where I want to return the parent tag ID when a button is clicked to implement a function.
<div id="botoes">
<button data-for="cod" onclick="checkbox(this)">cod</button>
<button data-for="nome" onclick="checkbox(this)">nome</button>
<button data-for="barras" onclick="checkbox(this)">barras</button>
<button data-for="desc" onclick="checkbox(this)">desc.</button>
</div>
how do I do it? My "google-fu" didn’t help me...
You want to have access to the "buttons" id from within the function
checkbox
, that’s it?– bfavaretto
no, the checkbox function is just her name.. she does something else and you didn’t even have to be there.
– LeandroLuk
Wow, so I don’t understand why you accepted the answer below...
– bfavaretto