JSFiddle - React, Tailwind, and code Playground
HTML
<a class="directions-link" href="http://example.com/1.html">Should go to http://example.com/1.html plus the addition, instead goes to: </a>
<a class="directions-link" href="http://example.com/2.html">Should go to http://example.com/2.html plus the addition, instead goes to: </a>
CSS
a{
display:block;
}
a:after{
content: attr(href);
background: #ccc;
}
JavaScript
$("a.directions-link").attr("href", $("a.directions-link").attr("href")+"?addition");