Bootstrap崩溃将打开但不会关闭

时间:2015-09-23 19:28:05

标签: jquery ruby-on-rails twitter-bootstrap

这是前端的链接。 Collapse not closing

我在Datatables表中有它..并且只是使用bootstrap类来打开和关闭所有内容..这是我的代码:

<%= form_tag push_to_shopify_products_path, :id => 'submit_to_shopify' do  %>
  <table id="products" class="table table-striped table-hover table-bordered 
  table-condensed">
  <thead>
    <tr>
      <th> </th>        
      <th><input type="checkbox" name="select-all" id="select-all" /></th>
      <th><a>TITLE</a></th>
      <th><a>ASIN</a></th>
      <th><a>PRICE</a></th>
      <th><a>SKU</a></th>
      <th> </th>
      <th> </th>
    </tr>
  </thead>
  <tbody class="product-index">

    <% @merchant.products.each do |product| %>
      <tr>
        <td>
          <button class="btn btn-primary" type="button" 
          data-toggle="collapse" data-target="#<%= product.asin %>" 
          aria-expanded="false" aria-controls="collapseExample">
          Button
          </button>
            <div class="collapse" id="<%= product.asin %>">
            <div>
            Why won't this do anything other than open then close?
            </div>
          </div>
        </td>
        <td><%= check_box_tag('sellersku[]', product.sellersku) %></td>
        <td><%= product.title %></td>
        ...
      </tr>

    <% end %>
  </tbody>
 </table>
 <% end %>

0 个答案:

没有答案
相关问题