title: jQuery moving row to another table based on selection in dropdown
body: <p>I have a page with multiple tables (one table per "Activity Type"). Their IDs are the "Activity Types". Each row in each table has a cell with a dropdown that allows users to select the "Activity Type" of the new table they'd like to move the row to. </p>
  
  <p>The below js code does move a row from its original table to the table of the selected "Activity Type" chosen in the dropdown menu. However, after the row is moved, the selected value in the dropdown remains as the old "Activity Type". How do I go about setting the value of the dropdown to the new "Activity Type" that the row now belongs to?</p>
  
  <pre><code>$('.override-activity').change(function () {
      // get selected Activity Type
      var activityType = $("option:selected", this).text().replace(/\s+/g, '');
  
      // get selected row
      var tr = $(this).closest("tr").remove().clone();
  
      // insert selected row into new Activity Type table
      $("#" + activityType).find("table").append(tr);
  });
  </code></pre>