JSFiddle - React, Tailwind, and code Playground
HTML
<a id="aId" href="http://google.com/basketball">More information</a>
JavaScript
var url = $('#aId').attr('href');
firstPart = url.substring(0, url.lastIndexOf('\/')+1);
$('#aId').attr('href', firstPart + "Football");
alert($('#aId').attr('href'));