JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<a class="directions-link" href="http://example.com/1.html">Should go to http://example.com/1.html plus the addition, result:  </a>

<a class="directions-link" href="http://example.com/2.html">Should go to http://example.com/2.html plus the addition, result:  </a>

CSS

a{
  display:block;
}

a:after{
  content:  attr(href);
  background: #ccc;
}

JavaScript

$("a.directions-link").attr("href", function(i, href) {
  return href + '?q=testing';
});

console.log($.fn.jquery)