I have a link that has an id from a database. When I click on it how can i copy this id to 2 buttons by applying to them the same id ? Behold how i try :
1- <a class="godown" id="<?=$row->id_apoint;?>"><?=$row->nombre;?></a>
2- <button class="bill" >button1</button> <button class="bill" >button2</button>
JQUERY
$('.godown').click(function() {
var godown = $(this).attr('id');
// How can I copy the variable **godown ** to the buttons so that they have the save id as godown ?
});
Thanks