Jquery how to append multiple var’s to a div

appendtojquery

i have some var's:

var1 = ('1');
var2 = ('2');
var3 = ('3');

how to append them to a div using jquery appendTo ?

var1, var2, var3.appendTo('.div');

thanks

edit:

var1 = $('<div class="1"></div>');
var2 = $('<div class="2"></div>');
var3 = $('<div class="3"></div>');

i want it to look like this:

<div class="div">
<div class="1"></div>
<div class="2"></div>
<div class="3"></div>
</div>

i can use:

var1.appendTo('.div');
var2.appendTo('.div');
var3.appendTo('.div');

but what if i have 15 vars??
and append alone doesn't do the job

Best Solution

$('.div').append(var1, var2, var3)

whatever a var is