Q:

How to refresh a table row with jQuery?

I have a table and in each row of the table is data and a form inside an accordion. Once the form is successfully submitted the accordion closes and I would like to know how to refresh the data in just that table row.
This works to refresh the entire table but I want to update just the relevant row. $("#credits_table").load(location.href + " #credits_table");
Many thanks
Each table row has a unique id.
This is what I have tried:  $("#tr"+num).load(location.href + " #tr"+num);//Reload row
The jQuery

//Edit Credit
    $( "form" ).submit(function (e) {
      e.preventDefault();
            // Get the submit button element
            var btn = $(this).find("button").attr("id");//Find button ID
            var num=btn.slice(3,this.id.length); //Get Unique ID for form 

            var formdata = $("#edit_credit"+num).serialize();//Submit correct form by adding unique id
            $.post('update_credit.php', formdata,
               function(data){
            console.log(data); 
            $(".panel-collapse").collapse("hide");//hide accordian
          $("#credits_table").load(location.href + " #credits_table");
        });
            return false;
  });

The table and form:
<table id="credits_table"><tr><th>ID</th><th>Production</th></tr>
<tr id="row_1"><td>data</td><td>more data</td></tr>

...and so on + form

<tr id="row_2">
<button data-toggle="collapse" data-parent="#accordion1" href="#content1" class="btn btn-small btn-default">edit</button>         
 </td></tr>
</table>

A:

How I have updated rows separately in a table is just by sending the new value to the row column. So within the success function call something like: 
$("#row1").find("td").eq(0).html(your new value here);

You can do that for each td with the new updated value. That is if you have your data separated out by columns and not just sending back the whole row of data. Even if you are returning the whole row you should be able to separate it out by columns and then add that data to each specific td it belongs to.
Also, if you update the db correctly then next time the user loads the page it will also have the new data value for that row. This way you don't have to reload the table each time the row is changed. 

