I am trying to add an id to my href using jQuery/Javascript:
This is my HTML:
<a href="product#=" id="39">Test</a>
What am trying to achieve is this:
<a href="product#=39" id="39">Test</a>
Basically just want to add this ID to href,
So far a manage to do this:
var link = $('a');
link.attr('href', link.attr('href') + '39');
This is ok but If I have more links, this will not work because the value is hardcoded,
Can anybody try to help me with this