title: Twitter bootstrap accordion not collapsing
body: <p>My Bootstrap Accordion is not collapsing. It is populated with JSON (Header and Content) and I use Knockout to do this. But for some reason it does not seem to collapse or even function as an accordion.
  Here is my code:</p>
  
  <pre><code>   var data = {
          "d": [
      {
          "__type": "Warehouse.Tracntrace.Members_Only.DLL.StockMovement.AvailibleStock",
          "WarehouseID": 1,
          "ProductSKUID": 1,
          "ProductSKUName": "Decoder 1132",
          "WarehouseName": "SoftwareDevelopmentTest",
          "Status": "Staging",
          "QtyUnassigned": 10
      },
      {
          "__type": "Warehouse.Tracntrace.Members_Only.DLL.StockMovement.AvailibleStock",
          "WarehouseID": 1,
          "ProductSKUID": 2,
          "ProductSKUName": "Decoder 1131",
          "WarehouseName": "SoftwareDevelopmentTest",
          "Status": "Staging",
          "QtyUnassigned": 5
      }
  ]
      };
  
      var data2 = {
          "d": [
      {
          "__type": "Warehouse.Tracntrace.Members_Only.DLL.StockMovement.StockReturnMethod",
          "WarehouseID": 1,
          "ProductSKUID": 2,
          "LotID": 2,
          "LotName": "TestLot2",
          "AreaID": 8,
          "AreaName": "TestArea3L2",
          "BinID": 18,
          "BinName": "Area8Bin2"
      },
      {
          "__type": "Warehouse.Tracntrace.Members_Only.DLL.StockMovement.StockReturnMethod",
          "WarehouseID": 1,
          "ProductSKUID": 2,
          "LotID": 3,
          "LotName": "TestLot3",
          "AreaID": 11,
          "AreaName": "TestArea2L3",
          "BinID": 20,
          "BinName": "Area10Bin1"
      },
      {
          "__type": "Warehouse.Tracntrace.Members_Only.DLL.StockMovement.StockReturnMethod",
          "WarehouseID": 1,
          "ProductSKUID": 2,
          "LotID": 4,
          "LotName": "TestLot4",
          "AreaID": 15,
          "AreaName": "TestArea2L4",
          "BinID": 24,
          "BinName": "Area14Bin1"
      },
       {
           "__type": "Warehouse.Tracntrace.Members_Only.DLL.StockMovement.StockReturnMethod",
           "WarehouseID": 1,
           "ProductSKUID": 1,
           "LotID": 2,
           "LotName": "TestLot2",
           "AreaID": 8,
           "AreaName": "TestArea3L2",
           "BinID": 18,
           "BinName": "Area8Bin2"
       },
      {
          "__type": "Warehouse.Tracntrace.Members_Only.DLL.StockMovement.StockReturnMethod",
          "WarehouseID": 1,
          "ProductSKUID": 1,
          "LotID": 3,
          "LotName": "TestLot3",
          "AreaID": 11,
          "AreaName": "TestArea2L3",
          "BinID": 20,
          "BinName": "Area10Bin1"
      },
      {
          "__type": "Warehouse.Tracntrace.Members_Only.DLL.StockMovement.StockReturnMethod",
          "WarehouseID": 1,
          "ProductSKUID": 1,
          "LotID": 4,
          "LotName": "TestLot4",
          "AreaID": 15,
          "AreaName": "TestArea2L4",
          "BinID": 24,
          "BinName": "Area14Bin1"
      }
  ]
      };
  
      var ProductViewmodel;
      //debugger; 
  
      //Binds ViewModel
      function bindProductModel(Products) {
          var self = this;
          self.items = ko.mapping.fromJS([]);
          ProductViewmodel = ko.mapping.fromJS(Products.d, self.items);
          console.log(ProductViewmodel());
      }
  
      //Binds First DataSet
      function bindModel(vm, data) {
          var self = this;
          vm.Locations = ko.mapping.fromJS(data.d);
          console.log(ProductViewmodel());
          $('#accordion2').collapse({
              toggle: false
          })
         }
  
  
  
      //Starting Function
      $(document).ready(function () {
          bindProductModel(data);
          bindModel(ProductViewmodel()[0], data2);
          ko.applyBindings(ProductViewmodel);
      })
  </code></pre>
  
  <p>Here is the HTML:</p>
  
  <pre><code>&lt;div class="accordion" id="accordion2" data-bind="foreach: items"&gt;
      &lt;div class="accordion-group"&gt;
          &lt;div class="accordion-heading"&gt;
              &lt;a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion"
                  href="#" data-bind="text: ProductSKUName"&gt;&lt;/a&gt;
          &lt;/div&gt;
          &lt;div id="collapseOne" class="accordion-body collapse in"&gt;
              &lt;div class="accordion-inner"&gt;
                  &lt;div id="injectbody"&gt;
                      &lt;table class="table table-striped"&gt;
                          &lt;thead&gt;
                              &lt;tr&gt;
                                  &lt;th&gt;
                                      #
                                  &lt;/th&gt;
                                  &lt;th&gt;
                                      Lot
                                  &lt;/th&gt;
                                  &lt;th&gt;
                                      Area
                                  &lt;/th&gt;
                                  &lt;th&gt;
                                      Bin
                                  &lt;/th&gt;
                                  &lt;th&gt;
                                      Qty To Assign
                                  &lt;/th&gt;
                              &lt;/tr&gt;
                          &lt;/thead&gt;
                          &lt;tbody data-bind="foreach: Locations"&gt;
                              &lt;tr&gt;
                                  &lt;td id="Assign"&gt;
                                      &lt;input type="checkbox" /&gt;
                                  &lt;/td&gt;
                                  &lt;td id="Lot" data-bind="text: LotName"&gt;
                                  &lt;/td&gt;
                                  &lt;td id="Area" data-bind="text: AreaName"&gt;
                                  &lt;/td&gt;
                                  &lt;td id="Bin" data-bind="text: BinName"&gt;
                                  &lt;/td&gt;
                                  &lt;td id="QtyToAssign"&gt;
                                      &lt;input type="text" /&gt;
                                  &lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/tbody&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Any help with this will be greatly appreciated.</p>