Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Fernando Neto MH

Editando efeito de um javascript

Recommended Posts

Olá galera do fórum, estou criando um página básica mais queria um sisteminha bem legal é o seguinte fiz uma barra com a seguinte css

#barra{ 
position: fixed; 
bottom: 0px; 
rigth:0px;
height: 50px; 
width: 100%; 
background-color: #333; 
} 

 

Tá aqui a página

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>página</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#ocultar").click(function(event){
  event.preventDefault();
  $("#barra").hide("show");
});

$("#mostrar").click(function(event){
  event.preventDefault();
  $("#barra").show(3000);
});
});
</script>
</head>
<body>
<p id="text">MINHA PÁGINA</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div id="barra">
<a href="#" id="ocultar">Ocultar a camada</a>
</div>
<script type="text/javascript" language="javascript" src="script.js"></script> //(estou usando tooltip não tem aver com o efeito
</body>
</html>

 

já tentei colocar

$(document).ready(function(){
$("#ocultar").click(function(event){
  event.preventDefault();
  $("#barra").slideDown("show");
});

$(document).ready(function(){
$("#ocultar").click(function(event){
  event.preventDefault();
  $("#barra").hide("slideDown");
});

não deu certo lembrando quero um efeito dela sair para baixo ok?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Primeiramente, atualize sua biblioteca jQuery para a versão mais recente.

 

Agora explique-nos, o que você está tentando fazer nesses trechos? Chamada por callback?

 

$("#barra").hide("show");

$("#barra").slideDown("show");

$("#barra").hide("slideDown");

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.