JSFiddle - React, Tailwind, and code Playground
by Hari Menon
HTML
<div class="a">A</div>
<div class="b">B</div>
<div class="c">C</div>
CSS
div {
width: 300px;
background-color: #ccc;
border: dotted thin #aaa;
margin: 2px;
text-align: center;
}
JavaScript
$(function () {
$('div').each(function () {
$(this).wrap('<a href="http://example.com/' + $(this).attr('class') + '" />');
});
});