JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<table class="partsTable">

    <tr>

        <td class="sideForPartsTable" width="5%">
            <button class="expandButton">Expand button</button>
        </td>
        <td class="sideForPartsTable">Title + sum1 + sum2</td>
        <td class="sideForPartsTable" width="5%">edit</td>
        <td class="sideForPartsTable" width="5%">remove</td>

    </tr>

    <tr>
        <td>
            <div class="partTableContent">
                <table>
                    <tr>
                        <td> Test1 </td>
                    </tr>
                    <tr>
                        <td> Test2 </td>
                    </tr>
                </table>
            </div>
        </td>
    </tr>

</table>

JavaScript

$('.partTableContent').hide();
  $('.expandButton').click(function() {
    // .parent() selects the A tag, .next() selects the P tag
    $('.partTableContent').slideToggle(0);
  });