JSFiddle - React, Tailwind, and code Playground

by Noir Noir

HTML

<script src="https://code.jquery.com/jquery-1.12.3.min.js"></script>
<table class="matrixA" align="center">
                      <tr>
                        <td><input type="text" placeholder="a1,1" value="123"></td>
                        <td><input type="text" placeholder="a1,2" value="123"></td>
                      </tr>
                      <tr>
                        <td><input type="text" placeholder="a2,1" value="123"></td>
                        <td><input type="text" placeholder="a2,2" value="123"></td>
                      </tr>
                    </table>

JavaScript

$(".matrixA input:text").each(function () {
            if ($(this).val() > 10) {
                $('.left-block').css('backgroundColor', '#f6c1c0');
                $('#error2').show();
                $('#multiple').addClass('disabled');
            }
            else {
                $('.left-block').css('backgroundColor', '#bcbcbc');
                $('#error2').hide();
                $('#multiple').removeClass('disabled');
            }
           });