I have a script that does the toggle in a DIV, when the icon is clicked the div will make the toggle, the other DIVS are closed, initially I used the Jquery accordian, however it was not useful, since the kinship is broken due to a title div, precise behavior should remain only in the div in question.
$(".taskIcon").on("click", function () {
var taskElementDetail = $(".taskDetail");
taskElementOthers = taskElementDetail.parent().siblings().not(taskElementDetail);
taskElementOthers
.hide();
taskElementDetail
.show();
});
<section class="col-sm-12 col-xs-12">
<div class="panel-group" <%--id="accordion"--%>>
<div>
<h4>
Titulo
</h4>
<div class="panel panel-default ">
<div class="panel-heading">
<span class="col-sm-8">
<span><i class="fa fa-check" aria-hidden="true"></i></span>
descricao
</span>
<span class="col-sm-1">
<a <%--data-toggle="collapse" data-parent="#accordion" href="#collapse1--%>"><i class="taskIcon glyphicon glyphicon-chevron-down"></i></a>
</span>
</div>
<div class="panel-collapse collapse taskDetail clearfix" <%--id="collapse1"--%>>
<div class="taskForm">
<p>
<small class="text-muted">detalhes</small> <br />
descricao
</p>
</div>
</div>
</div>
<div class="panel panel-default task">
<div class="panel-heading">
<span class="col-sm-8">
<a data-toggle="collapse" data-parent="#accordion" href="#collapse2"><i class="taskIcon glyphicon glyphicon-chevron-down"></i></a>
</span>
</div>
<div class="panel-collapse collapse taskDetail" <%--id="collapse2"--%>>
<div>
<p>
descricao
</p>
<div class="inner-editor">
<input type="text" class="form-control" placeholder="Observacao">
</div>
</div>
</div>
</div>
</div>
<div>
<h4>
Titulo
</h4>
<div class="panel panel-default ">
<div class="panel-heading">
<span class="col-sm-8">
<span><i class="fa fa-check" aria-hidden="true"></i></span>
descricao
</span>
<span class="col-sm-1">
<a <%--data-toggle="collapse" data-parent="#accordion" href="#collapse1--%>"><i class="taskIcon glyphicon glyphicon-chevron-down"></i></a>
</span>
</div>
<div class="panel-collapse collapse taskDetail clearfix" <%--id="collapse1"--%>>
<div class="taskForm">
<p>
<small class="text-muted">detalhes</small> <br />
descricao
</p>
</div>
</div>
</div>
<div class="panel panel-default task">
<div class="panel-heading">
<span class="col-sm-8">
<a data-toggle="collapse" data-parent="#accordion" href="#collapse2"><i class="taskIcon glyphicon glyphicon-chevron-down"></i></a>
</span>
</div>
<div class="panel-collapse collapse taskDetail" <%--id="collapse2"--%>>
<div>
<p>
descricao
</p>
<div class="inner-editor">
<input type="text" class="form-control" placeholder="Observacao">
</div>
</div>
</div>
</div>
</div>
</div>
</section>