1
I have a script that toggle in a DIV,when the icon and clicked the div make the toggle, the other DIVS were closed, initially I used the accordian of Jquery, however it was not useful, because the kinship and broken due to a div of title, precise behavior 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>
It would have a functional example?
– Rafael Augusto
no, at first I had done with accordian, I had to switch to the script
– Marcelo Batista