Skip to content

Instantly share code, notes, and snippets.

@gblnovaes
Created January 22, 2014 19:56
Show Gist options
  • Save gblnovaes/8566187 to your computer and use it in GitHub Desktop.
Save gblnovaes/8566187 to your computer and use it in GitHub Desktop.
Aparecer e ocultar usando Jquery
<DOCTYPE html>
<html lang="pt-br">
<head>
<title>Formulario simples</title>
<script type="text/javascript" src="jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#conteudo').hide();
$('#mostrar').click(function(event){
//event.preventDefault(); // esse preventDefault nao recebe parametros
$('#conteudo').show("slow");
});
});
</script>
</head>
<body>
<p>
<button type="submit" id="mostrar"> Consulta </button>
</p>
<div id="conteudo" style="background-color:#666666; width:200px;">
Teste
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment