JSFiddle - React, Tailwind, and code Playground

by jfriend00

HTML

Boxes will show blue if the "indent_xx" class is still attached.<br>
Boxes will show red if the "index_xx" class has been removed.<br><br>
<div class="refType indent_00"></div>
<div class="refType indent_01"></div>
<div class="refType indent_02"></div>
<div class="refType indent_03"></div>
<div class="refType indent_04"></div>

CSS

div {height: 50px; width: 100px; background-color: red; margin: 10px;}
.indent_00,
.indent_01,
.indent_02,
.indent_03,
.indent_04 {background-color: blue;}

JavaScript

$("[class*='indent_']").each(function() {
    this.className = $.trim(this.className.replace(/(^|\s)indent_\d+($|\s)/, " "));
});