JSFiddle - React, Tailwind, and code Playground

by mowglisanu

HTML

<li class="horizontal-tab-button">
  <a href="#">
    <strong>Application</strong>
  </a>
</li>

<li class="horizontal-tab-button">
<a href="#">
  <strong>Application</strong>
</a>
</li>

<li class="horizontal-tab-button">
<a href="#">
  <strong>Application Review</strong>
</a>
</li>

CSS

a {
  display: block;
}

JavaScript

$(".horizontal-tab-button a").each(function() {
    var anchorid = $(this).children('strong').html().replace(/ /g,"_").toLowerCase();
    $(this).attr('href', '#' + anchorid).find('strong').attr('id', anchorid);
});