Originariamente inviato da andreadb91
Diciamo anche che sono un pò negato di javascript e jquery
Mai sottovalutare i fogli di stile...
codice:
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Documento HTML</title>
<style type="text/css">
#metodopagamento-CARTADICREDITOEPAYPAL:checked ~ #tot1, #metodopagamento-CONTRASSEGNO:checked ~ #tot2 {
display: block;
}
#tot1, #tot2 {
display: none;
}
</style>
</head>
<body>
<dl>
<dt id="metodopagamento-label">
METODO DI PAGAMEMTO
</dt>
<dd>
<input type="radio" name="metodopagamento" id="metodopagamento-CARTADICREDITOEPAYPAL" value="CARTA DI CREDITO E PAYPAL" />
<label for="metodopagamento-CARTADICREDITOEPAYPAL">CARTA DI CREDITO E PAYPAL</label>
<input type="radio" name="metodopagamento" id="metodopagamento-CONTRASSEGNO" value="CONTRASSEGNO" />
<label for="metodopagamento-CONTRASSEGNO">CONTRASSEGNO</label>
<h2 id="tot1">Totale xxx € mediante CARTA DI CREDITO E PAYPAL</h2>
<h2 id="tot2">Totale xxx € mediante CONTRASSEGNO</h2>
</dd>
</dl>
</body>
</html>