JSFiddle - React, Tailwind, and code Playground
by kachibito
HTML
<ol reversed>
<li>List Item 01</li>
<li>List Item 02</li>
<li>List Item 03</li>
<li>List Item 04</li>
<li>List Item 05</li>
<li>List Item 06</li>
<li>List Item 07</li>
</ol>
JavaScript
function reverselist(list) {
var totalItems = $(list).children().length;
var start = $(list).attr('start');
var thisitem;
for(i=0; i < totalItems; i++) {
thisItem = $(list).children();
if (start !== "" && start !== undefined) {
thisItem.eq(i).attr('value', start - i);
} else {
thisItem.eq(i).attr('value', totalItems - i);
}
}
}
reverselist('ol[reversed=""]');