JSFiddle - React, Tailwind, and code Playground

by H17737

HTML

<table id='my_table'>
    <tr>
        <td>blah</td>
        <td>blah2</td>
    </tr>
    <tr>
        <td>blah</td>
        <td><a href='javscript:void(0);'>+</a></td>
    </tr>
</table>

CSS

td{
    border:1px solid #000;
}
table{
    border-collapse:collapse;
}

JavaScript

$(function(){
    var tableSize = $('table#my_table').height();
    
    $('table#my_table a:parent').mouseup(function(){
        $('table#my_table').append('<tr><td>blah</td><td>blah2</td></tr>');
        if($('table#my_table').height() !== tableSize){
            alert('height has changed');
            tableSize = $('table#my_table').height();
        }
    })
});