JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<svg width="100%" height="100%">
<defs>
<filter x="0" y="0" width="1" height="1" id="solid">
<feFlood flood-color="red" />
<feComposite in="SourceGraphic" />
</filter>
</defs>
<desc>3014</desc>
<rect x="0" width="63" height="36.15" y="976.138" class="position-bounds st7"></rect>
<text x="7.17" y="15" v:langid="1033" class="position-text st8 ">3014</text>
</svg>
<button id="clicker">Click</button>
JavaScript
$(document).ready(function() {
$('#clicker').on('click', function() {
// target text element by it's content
$('text:contains(3014)').attr('filter', 'url(#solid)');
});
});