title: Remove Single Table Row
body: <p>I've been searching through the web but I've had no luck in finding the solution to this problem. Yes I've tried other ways, but it didn't work either. Any help will be appreciated. </p>
  
  <p>So here it goes: I want to remove on single row from the table, each row has unique ID and I dont know what the problem is... What could be the solution?</p>
  
  <pre><code>   &lt;table id="Mytabel"&gt;
        &lt;tr&gt;
            &lt;th&gt;Month&lt;/th&gt;
            &lt;th&gt;Savings&lt;/th&gt;
            &lt;th&gt;DELETE ROW&lt;/th&gt;
        &lt;/tr&gt;
     &lt;/table&gt; 
  
     &lt;input type="button" value="ADD" id="btnADD"/&gt;
     &lt;script type="text/javascript"&gt;
  
        var cont = 0;
        function addRow(array) {
           $("#Mytabel").append("&lt;tr id=row+" + array.Id + "&gt;&lt;td&gt;" + array.Name +"&lt;/td&gt;
           &lt;td&gt;" + array.Cost + "&lt;/td&gt;
           &lt;td&gt;&lt;input type='button' id=" + array.Id + " value='DELETE' onClick='test(" + array.Id + ")'/&gt;&lt;/td&gt;&lt;/tr&gt;");
        }
  
        function test(id) {
            $("#row"+id).remove();
        }
  
        $(function() {
  
           $("#btnADD").click(function() {
  
               var vet = { Id: cont, Name: "jan", Cost: 15 };
               cont++;
               addRow(vet);
           });
        });
  
    &lt;/script&gt;
  </code></pre>