I have the following problem, I already managed to hide a div from right to left, but what happens is that the second div (the one that is going to be shown) does not appear until the first div is completely gone.
But I need that as the first div goes to the left, the second div comes to the right
Look at the codes:
First div
<div id="divHome" class="row visible">
<div class="col-md-6">
<h1 id="h1HomeTitle" class="lang" key="h1HomeTitle">Laboratorio estrategico</h1>
<h4 class="lang" key="h4FHomeFirstText">
Diseñamos a través de las necesidades de <br> marca la mejor ruta
para cumplir con sus <br> objetivos y alcanzar resultados.
</h4>
</div>
<div class="col-md-6">
<?php
echo $this->Html->image('Procesos.png', array('alt' => 'Proceso', 'key' => 'imgProcess',
'class' => 'lang', "width" => "650", "height" => "650"));
?>
</div>
</div>
Second div
<div id="divNeeds" class="row" hidden="true">
<div class="col-md-6">
<h1 id="h1NeedsTitle" class="lang" key="h1NeedsTitle">Descubrir necesidades</h1>
<h4 class="lang" key="h4FNeedsFirstText">
El comienzo de una estratégia funcional es conoces nuestro <br>
objetivo y que necesidades queremos resolver, de esta forma <br>
nuestro equipo a través de un laboratorio enlaza un vínculo con <br>
la marca y da comienzo al plan estrategico.
</h4>
</div>
<div class="col-md-6">
<?php
echo $this->Form->create('Need', array('class' => '', 'id' => 'msform'));
?>
<label class="lang" key="h1NeedForm">Aprovechemos el tiempo y comencemos</label>
<?php
echo $this->Form->input('client', array('label' => array('text' => "¿Para que marca vamos a trabahar?",
'key' => 'lblClient', 'class' => 'lang'), 'placeholder' => 'Dinos el nombre de tu empresa',
'class' => 'validador txtClient lang', 'key' => 'txtClient'));
echo $this->Form->input('need', array('label' => array('text' => "Escríbenos acerca de tu necesidad",
'key' => 'lblNeed', 'class' => 'lang'), 'placeholder' => 'Agradecemos nos detalles muy bien la necesidad, '
. 'es nuestro punto de partida para generar ideas quer fortalezcan la estrategia para resolverla.',
'rows' => '4', 'class' => 'validador txtNeed lang', 'key' => 'txtNeed', 'style' => 'resize: none;'));
echo $this->Form->input('objective', array('label' => array('text' => "¿Cuál es el objetivo?",
'key' => 'lblObjective', 'class' => 'lang'), 'placeholder' => 'Que se quiere alcanzar con la'
. 'solución de la necesidad, ¿Adquirir usuario? ¿Mejorar ventas? ¿Posicionar la marca? ... entre otros.'
. ' Agradecemos nos detalles muy bien el objetivo.', 'rows' => '4',
'class' => 'validador txtObjective lang', 'key' => 'txtObjective', 'style' => 'resize: none;'));
?>
<?php
$options = array(
'class' => 'lang',
'label' => 'Enviar y continuar',
'key' => 'btnFormNeed'
);
echo $this->Form->end($options);
?>
</div>
</div>
Visible class is to know which div is being displayed.
$(".visible").animate({
width: "toggle",
opacity: "toggle"
}, 2000);
$("#divNeeds").show();
This is how the first div is hidden, but I do not know how to show the second div since it only appears when the first div is not seen at all
I will show you how it is disappearing, I hope if it can be appreciated in photos, if not my apologies:
As you can see in the pictures, the second div remains quiet until the other one goes