Hi,
I'm working on a website where i have the list of all products and its info: image, description, reference and a button to see more images of the product. I want to create a checkbox that when is checked all the info is hidden except the image.
I'm using this code but the effect doesn't work. Can someone help me?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" type="image/x-icon" href="imagens/plasticos.ico" />
<link href="styles/style.css" rel="stylesheet" />
<title>Plásticos Futura - Produtos</title>
<script type="text/javascript" src="js/java.js"></script>
<!------------------------------------------------------------------------------>
<script language="javascript/jquery">
function validate(chk)
{
if (chk.checked == 1)
{
$("button").click(function()
{
$("p").hide(1000);
});
}
}
</script>
</head>
<!------------------------------------------------------------------------>
<p>
<td valign="top" class="texto_pretobig2"><strong>REFERÊNCIA: </strong><?php echo $row_produtos['referencia']; ?><br />
<strong>DESCRIÇÃO:</strong> <?php echo $row_produtos['nome']; ?>
<br/>
<br/>
<div id="a_img">
<a href="ver_produto.php?id_produto=<?php echo $row_produtos['id_produto']; ?>&id_categoria=<?php echo $row_produtos['id_material']; ?>" class="a_img">Mais imagens</a>
</div>
</p>
<!------------------------------------------------------------------------>
<br/>
<form>
<input type="checkbox" name="chk1"> Esconder Info</input>
<br/>
<button type="button" onclick="return validate(chk1);">Submeter</button>
</form>