That error comes to you because that function you use is not defined because you need the jQuery library you must add it
Just as you have it, it is already well appendTo (this causes it to be added to the end of the element):
$ (". info"). appendTo ("# information");
Alternatively, you can use the prependTo function (add it to the beginning of the element if you have more elements within it ):
$ (". info"). prependTo ("# information");
Example:
$("#appendTo").click(function() {
$('.info').appendTo('#informacion');
});
.info {
border: 1px solid red;
min-height: 50px;
}
#informacion {
border: 2px solid blue;
min-height: 100px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<p class="info" style="text-align: left;">Encuentra toda la info aquí</p>
<div id="informacion">
<h3>Div informacion</h3>
</div>
<button id="appendTo">Mover a #informacion</button>