I have the following divs:
<div id="divNeeds" class="row" >
<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>
<div id="divHome" class="row">
<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>
The idea is that eventually you will have several div not only those two, but in the view you will only see those that are inside:
<div class="principal visible"></div>
<div class="secundario oculto"></div>
So with jquery I'm always changing the info of those divs, with html ();
Like this:
var htmlDivSecundary = "<div id='div"+id+"' class='row' >"+$("#div"+id).html()+"</div>";
// alert(htmlDivSecundary);
$(".oculto").html(htmlDivSecundary);
In that full div with hidden class with the info of the div that is hidden and the same thing I will do with the div that contains the visible class
The thing is that I want to create a cpt file for each div, my question is from jquery as I load the cpt as an object from jquery to put it to the div with .html (object);
Thanks for the help.