-1
Hello, I have the following code:
<ul class="t_situacoes">
<?
if(isset($row)){
$row_pedido = $row;
}
if (!isset($situacoes_andamento))
$situacoes_andamento=$row_pedido->situacoes;
foreach($situacoes_andamento as $situacao){
if(in_array($situacao->id_situacao, $situacoes_layout)){
?>
<li class="situacao-<?=$situacoes_layout_classes[$situacao->id_situacao];?> <?=$row_pedido->id_situacao == $situacao->id_situacao ? 'atual' : ''?>">
<span></span>
<?=$situacao->nome_situacao;?>
<div id="botao-mais-detalhes" class="show-hidden-menu-<?=$situacoes_layout_classes[$situacao->id_situacao];?>" style="text-transform: lowercase;">˅ mais detalhes</div>
</li>
<div id="box-mais-detalhes" class="hidden-menu-<?=$situacoes_layout_classes[$situacao->id_situacao];?>" style="display: none;">
<div id="seta"></div>
<p id="texto-mais-detalhes">
<?=$situacao->nome_situacao;?>
<small>em <?=$ecommerce->getDate($situacao->data);?> às <?=$situacao->hora;?></small>
<em><?=$situacao->observacao_loja;?></em>
</p>
</div>
<? }
} ?>
<script>
$(document).ready(function() {
$('.show-hidden-menu-<?=$situacoes_layout_classes[$situacao->id_situacao];?>').click(function() {
$('.hidden-menu-<?=$situacoes_layout_classes[$situacao->id_situacao];?>').slideToggle("slow");
});
});
</script>
It turns out that the div action 'more details' only works on the last item
Thank you so much for the solution and the tips!!!
– Leo Meshoes