Collapse not hiding

0

I'm trying to make a table with collapse, but it happens that clicking the button collapses, but when trying to hide, it just does not work.

HTMLcode

<tr><td><inputtype="checkbox" name="chck" id="chck" class="filled-in chk-col-teal">
        <label for="rememberme">Título</label>
        <div class="collapse" id="collapseExample">
            <div class="well">
                Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica,
                craft beer labore wes anderson cred nesciunt sapiente ea proident.
            </div>
        </div><!--  faltou esta div -->
    </td>
    <td style="width:20px">
        <button class="btn bg-cyan waves-effect m-b-15" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
            Detalhes
        </button>
    </div>
    </td>
</tr>
    
asked by anonymous 20.06.2018 / 15:19

1 answer

1

Cara missed closing the div tag as Tony said, make sure you've imported all the files needed for the operation. follows your working code:

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet"/>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script><scriptsrc="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

<tr> 
  <td><input type="checkbox" name="chck" id="chck" class="filled-in chk-col-teal">
    <label for="rememberme">Título</label>
      <div class="collapse" id="collapseExample">
        <div class="well">
          Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
        </div>
      </div>  
  </td>
  <td style="width:20px"><button class="btn bg-cyan waves-effect m-b-15" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">Detalhes</button>
  </td>
</tr>
    
20.06.2018 / 15:29