JSFiddle - React, Tailwind, and code Playground

by Danny Hearnah

HTML

<p class="footnote">this is a test</p>
<p class="footnote">this is a test</p>
<p class="footnote">this is a test</p>
<p class="footnote">this is a test</p>
<p class="footnote">this is a test</p>

CSS

.footnote:before {
    content: attr(data-inc);
    display:inline-block;
}

JavaScript

$(document).ready(function(){
    
    $('.footnote').each(function(key){
        $(this).attr('data-inc', key+1 );
    });

});