I want to use the following code in jquery, I do not know if it's right:
$( ".card" ).on( "click", "#menu_arrow", function() {
$( "div[class|='collapse']" ).removeClass('show');
});
The menus are in a php loop that displayed the users along with this small menubar on the side of the name:
<div class="right-col col-lg-4 align-self-center align-items-center">
<a data-toggle="collapse" data-parent="#accordion" id="menu_arrow" href="#collapse<?php echo $matricula['id']; ?>" aria-expanded="true" aria-controls="collapse<?php echo $matricula['id']; ?>">Menu de opções <i class="fa fa-caret-down" id="caret2" aria-hidden="true"></i></a>
<div id="collapse<?php echo $matricula['id']; ?>" class="collapse hide" role="tabpanel" aria-labelledby="heading<?php echo $matricula['id']; ?>">
<div class="opt"><a href="<?php echo $url_base . "/painel/editar_usuarios.php?id=" . $matricula['id']; ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Editar cadastro</a></div>
<div class="opt"><a href="#"><i class="fa fa-list-alt" aria-hidden="true"></i> Editar boletim</a></div>
<div class="opt"><a href="#"><i class="fa fa-file-text" aria-hidden="true"></i> Imprimir histórico</a></div>
<div class="opt"><a href="#"><i class="fa fa-file-text" aria-hidden="true"></i> Imprimir ficha</a></div>
<div class="opt"><a href="#"><i class="fa fa-folder" aria-hidden="true"></i> Portifólio</a></div>
</div>
</div>