I have already seen another example here in the forum but it did not help me much by the amount of items inserted in div
.
$carrinho = '<div class="carrinhoMais">
<a href="carrinho.php">CARRINHO</a>
R$ <label class="totalCarrinho">'.$phpUtil->formataMoeda($semiTotal).'</label>
</div>';
echo '<script>$(".carrinho").html('.$carrinho.');</script>';
I'm not getting popular with div
.
I've tried
echo '<script>$(".carrinho").append('.$carrinho.');</script>';
It also did not work.
I think it's the amount of html.
Give the following error.
index.php:214 Uncaught SyntaxError: Unexpected token <
Line 214
<script>$(".carrinho").html(
<div class="carrinhoMais">
<a href="carrinho.php">CARRINHO</a>
R$ <label class="totalCarrinho">12,00</label>
</div>
);</script>