Bonne journée! J'essaye de cacher et montrer des divs avec l'animation de diapositive. Mon code est le suivant:Animation de diapositives Jquery
<style>
div.bigBox
{
background-color:white;
width:100px;
height:125px;
overflow:hidden;
}
div.try{
background-color:green;
width:100px;
height:125px;
float: left;
}
div.try2{
background-color:yellow;
width:100px;
height:125px;
}
}
</style>
<script language="JavaScript" src="js/jquery-1.6.1.js"></script>
<script src="http://ui.jquery.com/latest/ui/jquery.effects.core.js"></script>
<script src="http://ui.jquery.com/latest/ui/jquery.effects.slide.js"></script>
</head>
<body>
<div class="bigBox">
<div class="try">
<p id="haha">CLICK THIS</p>
<p>This is a demonstration of jQuery SimpleDialog.</p>
</div>
<div class="try2">
<h3 id="test2">CLICK THIS</h3>
<p>This is a demonstration of jQuery SimpleDialog.</p>
</div>
</div>
<script>
$('#haha').click(function() {
alert("test");
$('.try').hide("slide", { direction: "left" }, 1000);
$('.try2').show("slide", { direction: "right" }, 1000);
});
</script>
Le problème est la transition d'une case à l'autre. Cela ne coule pas très bien. Je veux me cacher et en même temps montrer (comme suivre la boîte à cacher). S'il vous plaît aider. Merci
Sans rapport avec le problème: vous avez une accolade de fermeture supplémentaire juste avant de fermer le style marque. Connexe: Voici un violon (jQ 1.7 pour rendre l'accès à jQ UI plus facile) pour toute personne qui prend un coup de poing: http://jsfiddle.net/GregP/CV7fd/ –