1
You need to take the contents of several div’s with equal classes. For example:
<div class='conteudo'>
<li>Conteúdo 1</li>
</div>
<div class='conteudo'>
<li>Conteúdo 2</li>
</div>
<div class='conteudo'>
<li>Conteúdo 3</li>
</div>
I want to take everything inside the classes minhaDiv
and display in another div, so that it stays like this:
<div class='minhaDiv'>
<li>Conteudo 1</li>
<li>Conteudo 2</li>
<li>Conteudo 3</li>
</div>
I’ve done it with jquery .text()
and it actually works, but I need the tags <li>
be "whores" too. How can I do that?
A doubt, the div with class
minhaDiv
will already be created and you just need to add the contents of the elements<li>
or the<div>
will be created together with Javascript?– Giancarlo Abel Giulian
You read about li and ul that I posted?
– Guilherme Nascimento