[jQuery] add child to <ul> very simple question!
Ok, this probably just needs someone to slap me towards a tutorial,
however I couldn't seem to find one!
I'm trying to use jquery to add a child to part of an unordered list,
so can anyone explain how to make a new sub-child of the id 'test'
appear? (see below)
SCRIPT:
function populateAmounts(){
$('#test').append(document.appendChild("name of new child");
}
HTML:
<ul>
<li><span class="folder">Subfolder 2.1</span>
<ul id="folder21">
<li id="test">File 2.1.1</li>
<li>File 2.1.2</li>
</ul>
</li>
<li><span class="file">File 2.2</span></li>
</ul>
Many thanks!