JSFiddle - React, Tailwind, and code Playground
HTML
<svg class="me" width="145" height="65">
<rect class="rect_style rect_color_1 rect_obvious" x="3" y="3" rx="20" ry="20" width="140" height="60">
</svg>
<button id="bntTest" type="button">remove</button>
CSS
.rect_style {
stroke:black;
stroke-width:5;
}
.rect_color_1 {
fill:#FFC863;
}
.rect_obvious {
opacity: .5;
}
.rect_none {
opacity: 0;
}
JavaScript
$(document).ready(function () {
$('#bntTest').on('click', function () {
var classData = $(".me rect").attr('class');
$(".me rect").attr('class', classData.replace('rect_obvious', ''));
alert($(".me rect").attr('class'));
});
});