title: losing css style in dynamically added table rows
body: <p>I've read a lot about adding and removing rows from tables dynamically. I'm very sure I have done everything the right way. </p>
  
  <p>my view:</p>
  
  <pre><code> &lt;table id="LibList" class="table table-responsive table-condensed table-bordered"&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th&gt;
                          @Html.DisplayNameFor(model =&gt; model.Step3.Liabilities[0].Types)
                      &lt;/th&gt;
                      &lt;th&gt;
                          @Html.DisplayNameFor(model =&gt; model.Step3.Liabilities[0].Name)
                      &lt;/th&gt;
                      &lt;th&gt;
                          @Html.DisplayNameFor(model =&gt; model.Step3.Liabilities[0].Balance)
                      &lt;/th&gt;
                      &lt;th&gt;
                          @Html.DisplayNameFor(model =&gt; model.Step3.Liabilities[0].Payment)
                      &lt;/th&gt;
                      &lt;th&gt;
                          @Html.DisplayNameFor(model =&gt; model.Step3.Liabilities[0].Interest)
                      &lt;/th&gt;
                      &lt;th&gt;
                          @Html.DisplayNameFor(model =&gt; model.Step3.Liabilities[0].Teams)
                      &lt;/th&gt;
                      &lt;th&gt;
                          @Html.DisplayNameFor(model =&gt; model.Step3.Liabilities[0].Tenure)
                      &lt;/th&gt;
                      &lt;th&gt;
  
                      &lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  @foreach (var item in Model.Step3.Liabilities) {
                      Html.RenderPartial("_LibListItem", item);
                  }
              &lt;/tbody&gt;
          &lt;/table&gt;
          &lt;p&gt;
              &lt;button type="button" class="btn btn-primary add-button"&gt;
                  &lt;span class="glyphicon glyphicon-plus"&gt;&lt;/span&gt; Add New
              &lt;/button&gt;
          &lt;/p&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Partial View:</p>
  
  <pre><code>&lt;tr&gt;
  @using (@Html.BeginCollectionItem("Liabilities")) {
      &lt;td&gt;
          @Html.DropDownListFor(model =&gt; model.Type, Model.Types, new { @class = "form-control selectpicker", id = "" })
      &lt;/td&gt;
      &lt;td&gt;
          @Html.TextBoxFor(model =&gt; model.Name, new { @class = "form-control", id = "" })
      &lt;/td&gt;
      &lt;td&gt;
          @Html.TextBoxFor(model =&gt; model.Balance, new { @class = "form-control auto", id = "" })
      &lt;/td&gt;
      &lt;td&gt;
          @Html.TextBoxFor(model =&gt; model.Payment, new { @class = "form-control auto", id = "" })
      &lt;/td&gt;
      &lt;td&gt;
          @Html.TextBoxFor(model =&gt; model.Interest, new { @class = "form-control", id = "", @type = "number" })
      &lt;/td&gt;
      &lt;td&gt;
          @Html.TextBoxFor(model =&gt; model.Teams, new { @class = "form-control", id = "", @type = "number" })
      &lt;/td&gt;
      &lt;td&gt;
          @Html.TextBoxFor(model =&gt; model.Tenure, new { @class = "form-control", id = "", @type = "number" })
      &lt;/td&gt;
      &lt;td&gt;
          &lt;button class="btn btn-primary remove-button" type="button" data-id="@Model.ID"&gt;
              &lt;span class="glyphicon glyphicon-trash"&gt;&lt;/span&gt;
          &lt;/button&gt;
      &lt;/td&gt;
  }
  </code></pre>
  
  <p></p>
  
  <p>Add function</p>
  
  <pre><code> $('.add-button').click(function () {
          var action = "/QuestionWizard/AddRow";
          $.ajax({
              url: action,
              cache: false,
              success: function (result) {
                  $("#LibList").find("tbody").append($(result));
              }
          });
      });
  </code></pre>
  
  <p>All of this works fine. However, the problem I'm having now is that when a new row is added, the css class "selectpicker' is not applied to the dropdown. </p>
  
  <p>I'm using <a href="https://github.com/silviomoreto/bootstrap-select" rel="nofollow">bootstrap-select</a> to style my dropdown. this works fine everywhere else in the application. </p>
  
  <p>Please can someone tell me what I'm doing wrong.</p>
  
  <p>Thanks.</p>