Can anyone tell me, how do I hide a div when I show another one?
I have a hidden div that only shows when I receive a condition. I would like that when this hidden div receives the condition and appears, hide another div.
However, there is no button action in this case. When entering the page, the visitor who did not choose anything previously, will find a warning and in this case, would like to hide another warning that is always open.
Eg Condition Div1 always visible. Div2 always hides.
As you enter the page; Div1 (still visible) would like to hide it. Div2 viewable.
DIV ALWAYS VISIBLE
<div id="AvisoCar">
<div class="AvisoCarrinho">** AVISO IMPORTANTE **</div></div>
DIV ONLY WHEN THE CART IS EMPTY:
<div class="ValorTotalComp">
TOTAL + FRETE: R$ <?=toReal((isset($_SESSION['LOJA_DEFAULT']['VALOR_FRETE'])?$_SESSION['LOJA_DEFAULT']['VALOR_FRETE']:0)+$totCompra)?> <? }
else { echo "**<div class='AvisoSacolavazia'>Sua sacola está vazia</div>**"; }?>
</div>
I would like that when the "Your Tote Bag is empty" warning appears on the page, hide the WarningCode
You do not need to have any button action.
I tried to do it through echo, but without success.