How to get the id and paste it in the link?
For example, there is a link
<a href="#" class="button" id="123"></a>
How to get the id value and paste into another link, to get something like this:
asked June 26th 19 at 14:19
the second button to choose the class or at your option
$('selector here').attr('href', '#buy='+$('.button').attr('id'))
Find more questions by tags jQuery